refactor 'app' to 'APP'
This commit is contained in:
parent
03ab987f78
commit
9156793852
2
app.py
2
app.py
@ -1,4 +1,4 @@
|
||||
from truthseeker import app # the variable 'app' is detected by `flask run`
|
||||
from truthseeker import APP as app # the variable 'app' is detected by `flask run`
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
|
@ -1,8 +1,8 @@
|
||||
import json
|
||||
import pytest
|
||||
from truthseeker import app
|
||||
from truthseeker import APP
|
||||
|
||||
test_app = app.test_client()
|
||||
test_app = APP.test_client()
|
||||
|
||||
class TestException(Exception):
|
||||
__test__ = False
|
||||
|
@ -29,7 +29,9 @@ class TruthSeekerApp(flask.Flask):
|
||||
f.close()
|
||||
print("Generated secret and wrote to secret.txt !")
|
||||
|
||||
app = TruthSeekerApp()
|
||||
APP = TruthSeekerApp()
|
||||
|
||||
app.register_blueprint(routes_api.routes_api, url_prefix="/api/v1")
|
||||
app.register_blueprint(routes_ui.routes_ui, url_prefix="/")
|
||||
from truthseeker.routes import routes_api, routes_ui
|
||||
|
||||
APP.register_blueprint(routes_api.routes_api, url_prefix="/api/v1")
|
||||
APP.register_blueprint(routes_ui.routes_ui, url_prefix="/")
|
||||
|
Loading…
Reference in New Issue
Block a user