1. Refactoring form objects and database objects to use inheritance and abstract base class for consistency and reduced redundancy.\n2. Contact us page button links updated to resolve error of missing link causing page refresh instead of expected functionality.

This commit is contained in:
2024-09-10 12:09:50 +01:00
parent c9dda91dc9
commit 6b730bf8e7
709 changed files with 5158 additions and 1512 deletions

View File

@@ -36,7 +36,7 @@ def home():
try:
model = Model_View_Home()
print('nips')
html_body = render_template('_page_home.html', model = model)
html_body = render_template('pages/core/_home.html', model = model)
except Exception as e:
return jsonify(error=str(e)), 403
return html_body
@@ -46,7 +46,7 @@ def contact():
try:
form = Form_Contact()
model = Model_View_Contact(form)
html_body = render_template('_page_contact.html', model = model)
html_body = render_template('pages/core/_contact.html', model = model)
except Exception as e:
return jsonify(error=str(e)), 403
return html_body
@@ -67,7 +67,7 @@ def contact_post():
mail.send(mailItem)
return "Submitted."
return "Invalid. Failed to submit."
# html_body = render_template('_page_contact.html', model = model)
# html_body = render_template('pages/core/_contact.html', model = model)
except Exception as e:
return jsonify(error=str(e)), 403
@@ -75,7 +75,7 @@ def contact_post():
def services():
try:
model = Model_View_Services()
html_body = render_template('_page_services.html', model = model)
html_body = render_template('pages/core/_services.html', model = model)
except Exception as e:
return jsonify(error=str(e)), 403
return html_body
@@ -84,7 +84,7 @@ def services():
def admin_home():
try:
model = Model_View_Admin_Home()
html_body = render_template('_page_admin_home.html', model = model)
html_body = render_template('pages/core/_admin_home.html', model = model)
except Exception as e:
return jsonify(error=str(e)), 403
return html_body