-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Database code to avoid overload
- Loading branch information
1 parent
5f0324f
commit 294fa69
Showing
7 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
from flask import Flask | ||
from flask_security import Security, SQLAlchemyUserDatastore, hash_password | ||
|
||
from .db.database import db | ||
from .data.database import db | ||
|
||
from dotenv import load_dotenv | ||
|
||
|
@@ -33,7 +33,7 @@ def create_app(): | |
app.config["WTF_CSRF_ENABLED"] = False | ||
|
||
# Configure Database | ||
from meshdb.db.setup import initialize_db | ||
from meshdb.data.setup import initialize_db | ||
|
||
initialize_db() | ||
|
||
|
@@ -51,6 +51,7 @@ def create_app(): | |
app.security.datastore.create_user(email="[email protected]", password=hash_password("abcd1234")) | ||
db.session.commit() | ||
|
||
# Register API routes | ||
from .routes import route_blueprint | ||
|
||
app.register_blueprint(route_blueprint) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters