2018-05-04 13:53:29 +02:00
|
|
|
#!/usr/bin/env python3
|
2017-04-19 15:14:20 +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
|
2019-06-19 17:02:09 +02:00
|
|
|
|
2019-11-20 16:15:08 +01:00
|
|
|
from Role_Manager import login_admin, login_analyst, login_read_only
|
2019-05-02 17:31:14 +02:00
|
|
|
from flask_login import login_required
|
2017-04-19 15:14:20 +02:00
|
|
|
|
|
|
|
# ============ VARIABLES ============
|
|
|
|
import Flask_config
|
|
|
|
|
|
|
|
app = Flask_config.app
|
|
|
|
|
2017-04-25 12:18:08 +02:00
|
|
|
rawSkeleton = Blueprint('rawSkeleton', __name__, template_folder='templates')
|
2017-04-19 15:14:20 +02:00
|
|
|
|
|
|
|
# ============ FUNCTIONS ============
|
|
|
|
def one():
|
|
|
|
return 1
|
|
|
|
|
|
|
|
# ============= ROUTES ==============
|
|
|
|
|
2017-04-25 12:18:08 +02:00
|
|
|
@rawSkeleton.route("/rawSkeleton/", methods=['GET'])
|
2019-05-02 17:31:14 +02:00
|
|
|
@login_required
|
2019-11-20 16:15:08 +01:00
|
|
|
@login_read_only
|
2017-04-19 15:14:20 +02:00
|
|
|
def skeleton_page():
|
2017-04-25 12:18:08 +02:00
|
|
|
return render_template("rawSkeleton.html")
|
2017-04-19 15:14:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
# ========= REGISTRATION =========
|
2017-04-25 12:18:08 +02:00
|
|
|
app.register_blueprint(rawSkeleton)
|