UX Improvements for Home page and Accessibility Statement page

This commit is contained in:
2024-07-31 16:52:05 +01:00
parent 6f4e329258
commit 0201b85836
2341 changed files with 11763 additions and 296638 deletions

Binary file not shown.

25
helpers/helper_app.py Normal file
View File

@@ -0,0 +1,25 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: Helpers
Feature: App Helper
"""
# internal
# external
from pydantic import BaseModel, ConfigDict
# from flask import Flask, render_template, jsonify, request, render_template_string, send_from_directory, redirect, url_for, session
# from flask_sqlalchemy import SQLAlchemy
class Helper_App(BaseModel):
@staticmethod
def get_request_data(request):
try:
return request.json
except:
return {}

View File

@@ -15,7 +15,7 @@ Notes: This architecture does not work with Flask-SQLAlchemy - db connection mus
from pydantic import BaseModel, ConfigDict
from flask import Flask, render_template, jsonify, request, render_template_string, send_from_directory, redirect, url_for, session
from flask_sqlalchemy import SQLAlchemy
import uuid
class Helper_DB_MySQL(BaseModel):
app: Flask
@@ -32,4 +32,8 @@ class Helper_DB_MySQL(BaseModel):
with self.app.app_context():
db.create_all()
db.engine.url = self.app.config.SQLALCHEMY_DATABASE_URI
return db
return db
@staticmethod
def create_guid():
return str(uuid.uuid4())