diff --git a/oshipka.py b/oshipka.py deleted file mode 100644 index 7b92f26..0000000 --- a/oshipka.py +++ /dev/null @@ -1,7 +0,0 @@ -from oshipka.persistance import init_db -from oshipka.webapp import app - -if __name__ == "__main__": - init_db(app) - - app.run(debug=True) diff --git a/src/__init__.py b/src/__init__.py index d05a084..e69de29 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1 +0,0 @@ -import oshipka \ No newline at end of file diff --git a/src/oshipka.py b/src/oshipka.py new file mode 100644 index 0000000..82d2b51 --- /dev/null +++ b/src/oshipka.py @@ -0,0 +1,7 @@ +from oshipka import init_db +from oshipka import app + +if __name__ == "__main__": + init_db(app) + + app.run(debug=True) diff --git a/src/oshipka/persistance/__init__.py b/src/oshipka/persistance/__init__.py index e69de29..f0b13d6 100644 --- a/src/oshipka/persistance/__init__.py +++ b/src/oshipka/persistance/__init__.py @@ -0,0 +1,3 @@ +from flask_sqlalchemy import SQLAlchemy + +db = SQLAlchemy() diff --git a/src/oshipka/persistance/models.py b/src/oshipka/persistance/models.py deleted file mode 100644 index 61e2559..0000000 --- a/src/oshipka/persistance/models.py +++ /dev/null @@ -1,8 +0,0 @@ -import json -import os - -from flask import render_template, request -from flask_sqlalchemy import SQLAlchemy -from sqlalchemy_utils import ChoiceType - -db = SQLAlchemy() \ No newline at end of file diff --git a/src/oshipka/persistance/populate.py b/src/oshipka/persistance/populate.py index dd8ce58..bd68c79 100644 --- a/src/oshipka/persistance/populate.py +++ b/src/oshipka/persistance/populate.py @@ -1,7 +1,7 @@ import os from config import SQLALCHEMY_DATABASE_URI, MAKEDIRS, DATABASE_FILE -from oshipka.persistance.models import db +from oshipka.persistance import db def populate_db(app):