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