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__":
|
if __name__ == "__main__":
|
||||||
app.run()
|
app.run()
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import json
|
import json
|
||||||
import pytest
|
import pytest
|
||||||
from truthseeker import app
|
from truthseeker import APP
|
||||||
|
|
||||||
test_app = app.test_client()
|
test_app = APP.test_client()
|
||||||
|
|
||||||
class TestException(Exception):
|
class TestException(Exception):
|
||||||
__test__ = False
|
__test__ = False
|
||||||
|
|||||||
@ -29,7 +29,9 @@ class TruthSeekerApp(flask.Flask):
|
|||||||
f.close()
|
f.close()
|
||||||
print("Generated secret and wrote to secret.txt !")
|
print("Generated secret and wrote to secret.txt !")
|
||||||
|
|
||||||
app = TruthSeekerApp()
|
APP = TruthSeekerApp()
|
||||||
|
|
||||||
app.register_blueprint(routes_api.routes_api, url_prefix="/api/v1")
|
from truthseeker.routes import routes_api, routes_ui
|
||||||
app.register_blueprint(routes_ui.routes_ui, url_prefix="/")
|
|
||||||
|
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