-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflasky.py
31 lines (26 loc) · 811 Bytes
/
flasky.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- coding: UTF-8 -*-
__author__ = 'hunter'
import click
from flask_migrate import Migrate
from app import create_app, db
from app.models.user import User, Role
# app = create_app(os.getenv('FLASK_CONFIG') or 'default')
app = create_app()
migrate = Migrate(app, db)
# @app.shell_context_processor
# def make_shell_context():
# return dict(db=db, User=User, Role=Role)
#
#
# @app.cli.command()
# @click.argument('test_names', nargs=-1)
# def test(test_names):
# """Run the unit tests."""
# import unittest
# if test_names:
# tests = unittest.TestLoader().loadTestsFromNames(test_names)
# else:
# tests = unittest.TestLoader().discover('tests')
# unittest.TextTestRunner(verbosity=2).run(tests)
if __name__ == '__main__':
app.run(use_reloader=True, debug=False)