1. Contact us page fixed - Model_View_Contact had not been updated to match new arguments for Model_View_Base.\n 2. Logo border radius increased to hide pencil icon watermark in bottom right hand corner. \n 3. Nav layout structure now dynamic based on user permissions

This commit is contained in:
2024-08-04 02:58:55 +01:00
parent 0201b85836
commit 6ad86825ea
116 changed files with 1878 additions and 1039 deletions

View File

@@ -10,40 +10,28 @@ Description:
Data model for contact view
"""
# IMPORTS
# VARIABLE INSTANTIATION
# METHODS
# IMPORTS
# internal
from models.model_view_base import Model_View_Base
# from routes import bp_home
from lib import argument_validation as av
from forms import Form_Contact
# external
from flask_wtf import FlaskForm
from abc import abstractproperty
from pydantic import BaseModel
# VARIABLE INSTANTIATION
# CLASSES
class Model_View_Contact(Model_View_Base):
# Attributes
ID_EMAIL: str = 'email'
ID_MESSAGE: str = 'msg'
ID_NAME: str = 'name'
form_contact: Form_Contact
@property
def title(self):
return 'Contact'
def __new__(cls, db, info_user, app, form):
# Initialiser - validation
_m = 'Model_View_Contact.__new__'
av.val_instance(form, 'form', _m, FlaskForm)
return super(Model_View_Contact, cls).__new__(cls, db, info_user, app)
def __init__(self, db, info_user, app, form):
# Constructor
super().__init__(db, info_user, app)
self.form = form
def __init__(self, app, db, form_contact, **kwargs):
super().__init__(app=app, db=db, form_contact=form_contact, **kwargs)
# self.form = form