Пример #1
0
 def setUp(self):
     self.app = create_app('testing')
     self.app_context = self.app.app_context()
     self.app_context.push()
     db.create_all()
     Role.insert_roles()
     self.client = self.app.test_client(use_cookies=True)
Пример #2
0
import os

from config import Config

DEBUG = False
try:
    if os.environ['DEBUG']:
        DEBUG = True
except:
    pass

config = Config()
from app1 import create_app

server = create_app()
if __name__ == "__main__":
    server.run(host='0.0.0.0', port=5000, debug=DEBUG)
Пример #3
0
#!/bin/env python
from app1 import create_app, socketio

app1 = create_app(debug=True)

if __name__ == '__main__':
    socketio.run(app1,host="0.0.0.0",port=5005)
Пример #4
0
# from app1 import flask_app_var

import app1
from app1.configs import configs

from app1.authentication.check_req_obj import req_obj_bp
from app1.authentication.tokenops import token_bp
from app1.authentication.token_after_login import token_login_bp

bp_list = [req_obj_bp, token_bp, token_login_bp]

app = app1.create_app(config_map_list=configs.prod_configs_from_file,
                      blue_print_list=bp_list)