1. New Router and Base Page Class architecture to avoid circular references and conform to module bundler requirements. \n 2. Relative path bug fix for lib/validation.js file to work using module bundler.

This commit is contained in:
2024-09-17 17:00:18 +01:00
parent d858f47ef5
commit 7668c35354
104 changed files with 1348 additions and 247 deletions

Binary file not shown.

View File

@@ -0,0 +1,24 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: Legal View Models
Feature: Accessibility Report View Model
Description:
Data model for accessibility report view
"""
# internal
from models.model_view_base import Model_View_Base
# from routes import bp_home
# external
class Model_View_Accessibility_Report(Model_View_Base):
@property
def title(self):
return 'Accessibility Report'
def __init__(self, hash_page_current=Model_View_Base.HASH_PAGE_ACCESSIBILITY_REPORT):
super().__init__(hash_page_current=hash_page_current)

View File

@@ -0,0 +1,24 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: Legal View Models
Feature: Accessibility Statement View Model
Description:
Data model for accessibility statement view
"""
# internal
from models.model_view_base import Model_View_Base
# from routes import bp_home
# external
class Model_View_Accessibility_Statement(Model_View_Base):
@property
def title(self):
return 'Accessibility Statement'
def __init__(self, hash_page_current=Model_View_Base.HASH_PAGE_ACCESSIBILITY_STATEMENT):
super().__init__(hash_page_current=hash_page_current)

View File

@@ -111,11 +111,11 @@ class Model_View_Base(BaseModel, ABC):
HASH_PAGE_ACCESSIBILITY_STATEMENT: ClassVar[str] = '/accessibility-statement'
HASH_PAGE_ADMIN_HOME: ClassVar[str] = '/admin'
HASH_PAGE_CONTACT: ClassVar[str] = '/contact'
HASH_PAGE_DATA_RETENTION_SCHEDULE: ClassVar[str] = '/retention-schedule'
HASH_PAGE_ERROR_NO_PERMISSION: ClassVar[str] = '/error'
HASH_PAGE_HOME: ClassVar[str] = '/'
HASH_PAGE_LICENSE: ClassVar[str] = '/license'
HASH_PAGE_PRIVACY_POLICY: ClassVar[str] = '/privacy-policy'
HASH_PAGE_DATA_RETENTION_SCHEDULE: ClassVar[str] = '/retention-schedule'
HASH_PAGE_SERVICES: ClassVar[str] = '/services'
# HASH_PAGE_STORE_ADMIN: ClassVar[str] = '/store/admin'
HASH_PAGE_STORE_BASKET: ClassVar[str] = '/store/basket'

View File

@@ -3,35 +3,22 @@ Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: View Models
Technology: Core View Models
Feature: Home View Model
Description:
Data model for home view
"""
# IMPORTS
# VARIABLE INSTANTIATION
# METHODS
# IMPORTS
# internal
from models.model_view_base import Model_View_Base
# from routes import bp_home
# external
# VARIABLE INSTANTIATION
# CLASSES
class Model_View_Home(Model_View_Base):
# Attributes
@property
def title(self):
return 'Home'
def __init__(self, hash_page_current=Model_View_Base.HASH_PAGE_HOME):
# Constructor
super().__init__(hash_page_current=hash_page_current)

View File

@@ -0,0 +1,24 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: Legal View Models
Feature: License View Model
Description:
Data model for license view
"""
# internal
from models.model_view_base import Model_View_Base
# from routes import bp_home
# external
class Model_View_License(Model_View_Base):
@property
def title(self):
return 'License'
def __init__(self, hash_page_current=Model_View_Base.HASH_PAGE_LICENSE):
super().__init__(hash_page_current=hash_page_current)

View File

@@ -0,0 +1,24 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: Legal View Models
Feature: Privacy Policy View Model
Description:
Data model for privacy policy view
"""
# internal
from models.model_view_base import Model_View_Base
# from routes import bp_home
# external
class Model_View_Privacy_Policy(Model_View_Base):
@property
def title(self):
return 'Privacy Policy'
def __init__(self, hash_page_current=Model_View_Base.HASH_PAGE_PRIVACY_POLICY):
super().__init__(hash_page_current=hash_page_current)

View File

@@ -0,0 +1,24 @@
"""
Project: PARTS Website
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Technology: Legal View Models
Feature: Retention Schedule View Model
Description:
Data model for retention schedule view
"""
# internal
from models.model_view_base import Model_View_Base
# from routes import bp_home
# external
class Model_View_Retention_Schedule(Model_View_Base):
@property
def title(self):
return 'Retention Schedule'
def __init__(self, hash_page_current=Model_View_Base.HASH_PAGE_DATA_RETENTION_SCHEDULE):
super().__init__(hash_page_current=hash_page_current)