Created better route setup
This commit is contained in:
parent
8282376e11
commit
c707e6366b
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1,2 @@
|
|||
from . import Routes
|
||||
from .pages import Login
|
|
@ -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>"
|
Loading…
Reference in New Issue