Feat: Contact Form MySQL database created and hooked up to web app on form submission. \n Fix: Removal of ERP and otherwise deprecated database and server code..
This commit is contained in:
31
controllers/core/home.py
Normal file
31
controllers/core/home.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
Project: PARTS Website
|
||||
Author: Edward Middleton-Smith
|
||||
Precision And Research Technology Systems Limited
|
||||
|
||||
Technology: App Routing
|
||||
Feature: Core - Home Routes
|
||||
|
||||
Description:
|
||||
Home Page Controller.
|
||||
"""
|
||||
|
||||
# internal
|
||||
from business_objects.api import API
|
||||
from models.model_view_home import Model_View_Home
|
||||
# external
|
||||
from flask import render_template, jsonify, Blueprint
|
||||
|
||||
|
||||
routes_core_home = Blueprint('routes_core_home', __name__)
|
||||
|
||||
|
||||
@routes_core_home.route(Model_View_Home.HASH_PAGE_HOME, methods=['GET'])
|
||||
def home():
|
||||
try:
|
||||
model = Model_View_Home()
|
||||
html_body = render_template('pages/core/_home.html', model = model)
|
||||
except Exception as e:
|
||||
return jsonify(error=str(e)), 403
|
||||
return html_body
|
||||
|
||||
Reference in New Issue
Block a user