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

@@ -19,10 +19,10 @@ Data model for store checkout success view
from models.model_view_store import Model_View_Store
from models.model_view_store_checkout import Model_View_Store_Checkout
# from routes import bp_home
from business_objects.product import Product
from business_objects.store.product import Product
from forms import Form_Billing # Form_Product
import lib.argument_validation as av
from datastores.datastore_store import DataStore_Store
# from datastores.datastore_store_base import DataStore_Store
# external
import os
@@ -36,20 +36,14 @@ class Model_View_Store_Checkout_Success(Model_View_Store_Checkout):
key_public_stripe: str
# Global constants
key_id_price = 'price_id'
@property
def title(self):
return 'Store Checkout Success'
def __new__(cls, db, id_user, app, id_checkout_session, checkout_items, id_currency, id_region_delivery, is_included_VAT):
# Initialiser - validation
_m = 'Model_View_Store_Checkout_Success.__new__'
# av.val_list(checkout_items, 'checkout_items', _m)
av.val_str(id_checkout_session, 'id_checkout_session', _m)
return super(Model_View_Store_Checkout_Success, cls).__new__(cls, db, id_user, app, id_currency, id_region_delivery, is_included_VAT)
def __init__(self, db, id_user, app, id_checkout_session, checkout_items, id_currency, id_region_delivery, is_included_VAT):
def __init__(self, id_checkout_session, checkout_items, id_currency, id_region_delivery, is_included_VAT, hash_page_current=Model_View_Store.HASH_PAGE_STORE_CHECKOUT_SUCCESS):
# Constructor
super().__init__(db, id_user, app, id_currency, id_region_delivery, is_included_VAT)
super().__init__(hash_page_current=hash_page_current, id_currency=id_currency, id_region_delivery=id_region_delivery, is_included_VAT=is_included_VAT)
self.checkout_items = checkout_items
self.id_checkout_session = id_checkout_session
self.order = self.get_many_user_order('', 1, id_checkout_session)