2018-05-04 13:53:29 +02:00
|
|
|
#!/usr/bin/env python3
|
2017-04-25 15:22:04 +02:00
|
|
|
# -*-coding:UTF-8 -*
|
|
|
|
|
|
|
|
'''
|
|
|
|
Flask functions and routes for the trending modules page
|
|
|
|
'''
|
|
|
|
import redis
|
|
|
|
from flask import Flask, render_template, jsonify, request, Blueprint
|
|
|
|
|
|
|
|
# ============ VARIABLES ============
|
|
|
|
import Flask_config
|
|
|
|
|
|
|
|
app = Flask_config.app
|
|
|
|
cfg = Flask_config.cfg
|
2018-09-20 10:38:19 +02:00
|
|
|
baseUrl = Flask_config.baseUrl
|
2017-04-25 15:22:04 +02:00
|
|
|
|
|
|
|
MODULENAME = Blueprint('MODULENAME', __name__, template_folder='templates')
|
|
|
|
|
|
|
|
# ============ FUNCTIONS ============
|
|
|
|
def one():
|
|
|
|
return 1
|
|
|
|
|
|
|
|
# ============= ROUTES ==============
|
|
|
|
|
|
|
|
@MODULENAME.route("/MODULENAME/", methods=['GET'])
|
|
|
|
def MODULENAME_page():
|
|
|
|
return render_template("MODULENAME.html")
|
|
|
|
|
|
|
|
|
|
|
|
# ========= REGISTRATION =========
|
2018-09-20 10:38:19 +02:00
|
|
|
app.register_blueprint(MODULENAME, url_prefix=baseUrl)
|