From ab63eeff96e96b8f8eafcb8579385dab9e4bd552 Mon Sep 17 00:00:00 2001 From: William Peebles Date: Sat, 19 Nov 2022 16:44:50 -0500 Subject: [PATCH] refactor to make way for dockerization --- app.py => app/app.py | 2 +- create_events.py => app/create_events.py | 0 db.py => app/db.py | 0 forms.py => app/forms.py | 0 init_db.py => app/init_db.py | 0 {migrations => app/migrations}/README | 0 {migrations => app/migrations}/alembic.ini | 0 {migrations => app/migrations}/env.py | 0 {migrations => app/migrations}/script.py.mako | 0 {migrations => app/migrations}/versions/bf65c9f77f9f_.py | 0 misc.py => app/misc.py | 0 requirements.txt => app/requirements.txt | 0 {templates => app/templates}/base.html | 0 {templates => app/templates}/createAccount.html | 0 {templates => app/templates}/editEvent.html | 0 {templates => app/templates}/editPeriod.html | 0 {templates => app/templates}/edittask.html | 0 {templates => app/templates}/events.html | 0 {templates => app/templates}/index.html | 0 {templates => app/templates}/login.html | 0 {templates => app/templates}/newPeriod.html | 0 {templates => app/templates}/newtask.html | 0 {templates => app/templates}/periods.html | 0 {templates => app/templates}/task.html | 0 {templates => app/templates}/tasks.html | 0 25 files changed, 1 insertion(+), 1 deletion(-) rename app.py => app/app.py (98%) rename create_events.py => app/create_events.py (100%) rename db.py => app/db.py (100%) rename forms.py => app/forms.py (100%) rename init_db.py => app/init_db.py (100%) rename {migrations => app/migrations}/README (100%) rename {migrations => app/migrations}/alembic.ini (100%) rename {migrations => app/migrations}/env.py (100%) rename {migrations => app/migrations}/script.py.mako (100%) rename {migrations => app/migrations}/versions/bf65c9f77f9f_.py (100%) rename misc.py => app/misc.py (100%) rename requirements.txt => app/requirements.txt (100%) rename {templates => app/templates}/base.html (100%) rename {templates => app/templates}/createAccount.html (100%) rename {templates => app/templates}/editEvent.html (100%) rename {templates => app/templates}/editPeriod.html (100%) rename {templates => app/templates}/edittask.html (100%) rename {templates => app/templates}/events.html (100%) rename {templates => app/templates}/index.html (100%) rename {templates => app/templates}/login.html (100%) rename {templates => app/templates}/newPeriod.html (100%) rename {templates => app/templates}/newtask.html (100%) rename {templates => app/templates}/periods.html (100%) rename {templates => app/templates}/task.html (100%) rename {templates => app/templates}/tasks.html (100%) diff --git a/app.py b/app/app.py similarity index 98% rename from app.py rename to app/app.py index e39c17e..98f2e46 100644 --- a/app.py +++ b/app/app.py @@ -13,7 +13,7 @@ basedir = os.path.abspath(os.path.dirname(__file__)) app = Flask(__name__) app.config['SECRET_KEY'] = 'HwG55rpe83jcaglifXm8NuF4WEeXyJV4' app.config['SQLALCHEMY_DATABASE_URI'] =\ - 'sqlite:///' + os.path.join(basedir, 'database.db') + 'sqlite:///' + os.path.join(basedir, os.environ['SQLITE_DB']) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False db.init_app(app) diff --git a/create_events.py b/app/create_events.py similarity index 100% rename from create_events.py rename to app/create_events.py diff --git a/db.py b/app/db.py similarity index 100% rename from db.py rename to app/db.py diff --git a/forms.py b/app/forms.py similarity index 100% rename from forms.py rename to app/forms.py diff --git a/init_db.py b/app/init_db.py similarity index 100% rename from init_db.py rename to app/init_db.py diff --git a/migrations/README b/app/migrations/README similarity index 100% rename from migrations/README rename to app/migrations/README diff --git a/migrations/alembic.ini b/app/migrations/alembic.ini similarity index 100% rename from migrations/alembic.ini rename to app/migrations/alembic.ini diff --git a/migrations/env.py b/app/migrations/env.py similarity index 100% rename from migrations/env.py rename to app/migrations/env.py diff --git a/migrations/script.py.mako b/app/migrations/script.py.mako similarity index 100% rename from migrations/script.py.mako rename to app/migrations/script.py.mako diff --git a/migrations/versions/bf65c9f77f9f_.py b/app/migrations/versions/bf65c9f77f9f_.py similarity index 100% rename from migrations/versions/bf65c9f77f9f_.py rename to app/migrations/versions/bf65c9f77f9f_.py diff --git a/misc.py b/app/misc.py similarity index 100% rename from misc.py rename to app/misc.py diff --git a/requirements.txt b/app/requirements.txt similarity index 100% rename from requirements.txt rename to app/requirements.txt diff --git a/templates/base.html b/app/templates/base.html similarity index 100% rename from templates/base.html rename to app/templates/base.html diff --git a/templates/createAccount.html b/app/templates/createAccount.html similarity index 100% rename from templates/createAccount.html rename to app/templates/createAccount.html diff --git a/templates/editEvent.html b/app/templates/editEvent.html similarity index 100% rename from templates/editEvent.html rename to app/templates/editEvent.html diff --git a/templates/editPeriod.html b/app/templates/editPeriod.html similarity index 100% rename from templates/editPeriod.html rename to app/templates/editPeriod.html diff --git a/templates/edittask.html b/app/templates/edittask.html similarity index 100% rename from templates/edittask.html rename to app/templates/edittask.html diff --git a/templates/events.html b/app/templates/events.html similarity index 100% rename from templates/events.html rename to app/templates/events.html diff --git a/templates/index.html b/app/templates/index.html similarity index 100% rename from templates/index.html rename to app/templates/index.html diff --git a/templates/login.html b/app/templates/login.html similarity index 100% rename from templates/login.html rename to app/templates/login.html diff --git a/templates/newPeriod.html b/app/templates/newPeriod.html similarity index 100% rename from templates/newPeriod.html rename to app/templates/newPeriod.html diff --git a/templates/newtask.html b/app/templates/newtask.html similarity index 100% rename from templates/newtask.html rename to app/templates/newtask.html diff --git a/templates/periods.html b/app/templates/periods.html similarity index 100% rename from templates/periods.html rename to app/templates/periods.html diff --git a/templates/task.html b/app/templates/task.html similarity index 100% rename from templates/task.html rename to app/templates/task.html diff --git a/templates/tasks.html b/app/templates/tasks.html similarity index 100% rename from templates/tasks.html rename to app/templates/tasks.html