2020-03-09 18:35:02 +00:00
|
|
|
# Python imports
|
|
|
|
|
|
|
|
# Lib imports
|
2019-12-22 19:09:36 +00:00
|
|
|
from flask import request, render_template
|
|
|
|
|
2020-03-09 18:35:02 +00:00
|
|
|
# App imports
|
2020-10-30 23:25:34 +00:00
|
|
|
from core import app, db # Get from __init__
|
|
|
|
from core.utils import MessageHandler # Get simple message processor
|
2019-11-01 22:54:25 +00:00
|
|
|
|
2019-12-22 19:09:36 +00:00
|
|
|
|
2019-11-01 22:54:25 +00:00
|
|
|
msgHandler = MessageHandler()
|
2020-03-09 18:35:02 +00:00
|
|
|
TITLE = app.config['TITLE']
|
2019-11-01 22:54:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
@app.route('/', methods=['GET', 'POST'])
|
2020-03-14 06:15:31 +00:00
|
|
|
def home():
|
2019-11-01 22:54:25 +00:00
|
|
|
if request.method == 'GET':
|
|
|
|
return render_template('index.html',
|
2020-03-09 18:35:02 +00:00
|
|
|
title=TITLE)
|
2020-01-12 19:32:47 +00:00
|
|
|
|
|
|
|
return render_template('error.html',
|
|
|
|
title='Error!',
|
|
|
|
message='Must use GET request type...')
|
2020-03-14 04:55:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
@app.route('/about', methods=['GET', 'POST'])
|
|
|
|
def about():
|
|
|
|
if request.method == 'GET':
|
|
|
|
return render_template('about.html',
|
|
|
|
title=TITLE)
|
|
|
|
|
|
|
|
return render_template('error.html',
|
|
|
|
title='Error!',
|
|
|
|
message='Must use GET request type...')
|