Beispiel #1
0
def get_sitemap():
    # 返回reboots文件
    sitemap_txt_path = r'sitemap/sitemap.txt'
    return app.send_static_file(sitemap_txt_path)
Beispiel #2
0
def environment_mange():
    return app.send_static_file('environment.html')
Beispiel #3
0
def sitemap_i1():
    return app.send_static_file('sitemap_r1.xml')
Beispiel #4
0
def catch_all(path):
    return app.send_static_file("index.html")
Beispiel #5
0
def GSC_file():
  return app.send_static_file('google137e022a821ce1e1.html')
Beispiel #6
0
def ico():
    #fi = open(server_dir + 'favicon.ico', "rb")
    #return fi.read()
    #return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')
    return app.send_static_file("favicon.ico")
Beispiel #7
0
def parameter_detail_page(parameter_id):
    return app.send_static_file('parameter_detail.html')
Beispiel #8
0
def batch_run_log_detail(run_log_id, page_num):
    return app.send_static_file('batch_run_log_detail.html')
Beispiel #9
0
def logout():
    if cur_user():
        del session['user_id']
        del session['real_name']
        del session['timestamp']
    return app.send_static_file('logout.html')
Beispiel #10
0
def parameter_page(page_num):
    return app.send_static_file('parameter.html')
Beispiel #11
0
def email_manage():
    return app.send_static_file('email_manage.html')
Beispiel #12
0
def use_case_report():
    return app.send_static_file('report.html')
Beispiel #13
0
def environment_detail():
    return app.send_static_file('environment_detail.html')
Beispiel #14
0
def batch_run_log_page(page_num):
    return app.send_static_file('batch_run_log.html')
Beispiel #15
0
def interface_page(page_num):
    return app.send_static_file('interface.html')
Beispiel #16
0
def use_case_run_log_detail(run_log_id):
    return app.send_static_file('use_case_run_log_detail.html')
Beispiel #17
0
def interface_detail_page(interface_id):
    return app.send_static_file('interface_detail.html')
Beispiel #18
0
def home():
    return app.send_static_file('index.html')
Beispiel #19
0
def use_case_page(page_num):
    return app.send_static_file('use_case_detail.html')
Beispiel #20
0
import json

from application import app, es
from application.models import User, Token, Concept
from flask import request, jsonify, abort, g
from functools import wraps
from itsdangerous import (TimedJSONWebSignatureSerializer as Serializer,
                          BadSignature, SignatureExpired)

app.add_url_rule('/', 'root', lambda: app.send_static_file('index.html'))


def verify_auth_token(token):
    """
    Verifies that the token is valid for a user.
    """
    s = Serializer(app.config['SECRET_KEY'])
    data = None
    try:
        data = s.loads(token)
    except SignatureExpired:
        return None
    except BadSignature:
        return None
    token = Token(token, data['email'])
    if token.is_valid_token():
        return token.retrieve_user()
    else:
        return None

Beispiel #21
0
def use_case_detail_page(use_case_id):
    return app.send_static_file('use_case_detail.html')
Beispiel #22
0
def sitemap():
    return app.send_static_file('sitemap.xml')
Beispiel #23
0
def batch_page(page_num):
    return app.send_static_file('batch.html')
Beispiel #24
0
def GSC_file():
    return app.send_static_file('google137e022a821ce1e1.html')
Beispiel #25
0
def batch_detail_page(batch_id):
    return app.send_static_file('batch_detail.html')
Beispiel #26
0
def index():
    return app.send_static_file("index.html")
Beispiel #27
0
def use_case_run_log_page(page_num):
    return app.send_static_file('use_case_run_log.html')
Beispiel #28
0
def sendoutput():
	print "eee"
	return app.send_static_file('output.csv')
Beispiel #29
0
def ico():
    #fi = open(server_dir + 'favicon.ico', "rb")
    #return fi.read()
    #return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')
    return app.send_static_file("favicon.ico")