2019-12-22 19:09:36 +00:00
|
|
|
from flask import request, render_template
|
2020-03-06 07:27:02 +00:00
|
|
|
from core import app, db # Get from __init__
|
2019-12-22 19:09:36 +00:00
|
|
|
|
2020-03-06 07:27:02 +00:00
|
|
|
from core.models import Table # Get db models
|
|
|
|
from core.MessageHandler import MessageHandler # Get simple message processor
|
2019-11-01 22:54:25 +00:00
|
|
|
|
2019-12-22 19:09:36 +00:00
|
|
|
|
|
|
|
# Python imports
|
2019-11-01 22:54:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
msgHandler = MessageHandler()
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/', methods=['GET', 'POST'])
|
|
|
|
def root():
|
|
|
|
if request.method == 'GET':
|
|
|
|
return render_template('index.html',
|
|
|
|
title=':::APP TITLE:::')
|
2020-01-12 19:32:47 +00:00
|
|
|
|
|
|
|
return render_template('error.html',
|
|
|
|
title='Error!',
|
|
|
|
message='Must use GET request type...')
|