1.started removal of CDNs.\n 2. Improved modular structure for all parts of project including database.

This commit is contained in:
2024-08-30 23:27:28 +01:00
parent 18977c8cac
commit f9cd9ec33a
2895 changed files with 490579 additions and 7561 deletions

View File

@@ -18,7 +18,7 @@ Data model for store home view
# internal
from models.model_view_store import Model_View_Store
# from routes import bp_home
from business_objects.product import Product
from business_objects.store.product import Product
from forms import Form_Basket_Add, Form_Basket_Edit # Form_Product
# external
@@ -40,15 +40,11 @@ class Model_View_Store_Home(Model_View_Store):
return 'Store Home'
max_products_per_category = -1
def __new__(cls, db, app, id_currency, id_region_delivery, is_included_VAT):
# Initialiser - validation
return super(Model_View_Store_Home, cls).__new__(cls, db, app, id_currency, id_region_delivery, is_included_VAT)
def __init__(self, db, app, id_currency, id_region_delivery, is_included_VAT):
def __init__(self, id_currency, id_region_delivery, is_included_VAT, hash_page_current=Model_View_Store.HASH_PAGE_STORE_):
# Constructor
super().__init__(db, app, id_currency, id_region_delivery, is_included_VAT)
# self.categories = Model_View_Store_Home.get_many_product_category(self.db, get_all_category = True, get_all_product = True)
# self.get_many_product_category(get_all_category = True, get_all_product = True)
super().__init__(id_currency, id_region_delivery, is_included_VAT)
# self.categories = Model_View_Store_Home.get_many_product(self.db, get_all_category = True, get_all_product = True)
# self.get_many_product(get_all_category = True, get_all_product = True)
"""
self.forms_product = {}
for cat in self.product_categories: