Changed login stub; added title to session
This commit is contained in:
parent
c707e6366b
commit
5b0bf5843d
|
@ -4,6 +4,8 @@ from flask_sqlalchemy import SQLAlchemy
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///static/db/database.db"
|
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///static/db/database.db"
|
||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
||||||
|
app.config['TITLE'] = ':::APP TITLE:::'
|
||||||
|
|
||||||
|
|
||||||
from core.models import db
|
from core.models import db
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
from flask import request, render_template
|
# Python imports
|
||||||
from core import app, db # Get from __init__
|
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
|
from flask import request, render_template
|
||||||
|
|
||||||
|
# App imports
|
||||||
|
from core import app, db # Get from __init__
|
||||||
from core.models import Table # Get db models
|
from core.models import Table # Get db models
|
||||||
from core.MessageHandler import MessageHandler # Get simple message processor
|
from core.MessageHandler import MessageHandler # Get simple message processor
|
||||||
|
|
||||||
|
|
||||||
# Python imports
|
|
||||||
|
|
||||||
|
|
||||||
msgHandler = MessageHandler()
|
msgHandler = MessageHandler()
|
||||||
|
TITLE = app.config['TITLE']
|
||||||
|
|
||||||
|
|
||||||
@app.route('/', methods=['GET', 'POST'])
|
@app.route('/', methods=['GET', 'POST'])
|
||||||
def root():
|
def root():
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
return render_template('index.html',
|
return render_template('index.html',
|
||||||
title=':::APP TITLE:::')
|
title=TITLE)
|
||||||
|
|
||||||
return render_template('error.html',
|
return render_template('error.html',
|
||||||
title='Error!',
|
title='Error!',
|
||||||
|
|
|
@ -1,8 +1,22 @@
|
||||||
|
# Python imports
|
||||||
|
|
||||||
|
# Lib imports
|
||||||
from flask import request, render_template
|
from flask import request, render_template
|
||||||
|
|
||||||
|
# App imports
|
||||||
from core import app, db
|
from core import app, db
|
||||||
|
from core.MessageHandler import MessageHandler # Get simple message processor
|
||||||
|
|
||||||
|
|
||||||
|
msgHandler = MessageHandler()
|
||||||
|
TITLE = app.config['TITLE']
|
||||||
|
|
||||||
@app.route('/login', methods=['GET', 'POST'])
|
@app.route('/login', methods=['GET', 'POST'])
|
||||||
def login():
|
def login():
|
||||||
return "<h1>Login Page Stub...</h1>"
|
if request.method == 'GET':
|
||||||
|
return render_template('login.html',
|
||||||
|
title=TITLE)
|
||||||
|
|
||||||
|
return render_template('error.html',
|
||||||
|
title='Error!',
|
||||||
|
message='Must use GET request type...')
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
{% extends "layout.html" %}
|
||||||
|
|
||||||
|
{% block body_header_additional %}
|
||||||
|
{% endblock body_header_additional %}
|
||||||
|
|
||||||
|
{% block body_content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col justify-content-center text-center">
|
||||||
|
<p>Login stub...</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock body_content %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block body_footer_additional %}
|
||||||
|
{% endblock body_footer_additional %}
|
||||||
|
|
||||||
|
{% block body_scripts_additional %}
|
||||||
|
<script src="{{ url_for('static', filename='js/ui-logic.js')}}"></script>
|
||||||
|
<script src="{{ url_for('static', filename='js/post-ajax.js')}}"></script>
|
||||||
|
<script src="{{ url_for('static', filename='js/ajax.js')}}"></script>
|
||||||
|
<script src="{{ url_for('static', filename='js/events.js')}}"></script>
|
||||||
|
{% endblock body_scripts_additional %}
|
Loading…
Reference in New Issue