Created better route setup

This commit is contained in:
Maxim Stewart 2020-03-06 01:27:02 -06:00
parent 8282376e11
commit c707e6366b
4 changed files with 15 additions and 5 deletions

View File

@ -5,7 +5,7 @@ app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///static/db/database.db"
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
from .models import db
from core.models import db
db.init_app(app)
from . import routes
from core import routes

View File

@ -1,8 +1,8 @@
from flask import request, render_template
from . import app, db # Get from __init__
from core import app, db # Get from __init__
from .models import Table # Get db models
from .MessageHandler import MessageHandler # Get simple message processor
from core.models import Table # Get db models
from core.MessageHandler import MessageHandler # Get simple message processor
# Python imports

View File

@ -0,0 +1,2 @@
from . import Routes
from .pages import Login

View File

@ -0,0 +1,8 @@
from flask import request, render_template
from core import app, db
@app.route('/login', methods=['GET', 'POST'])
def login():
return "<h1>Login Page Stub...</h1>"