Ejemplo n.º 1
0
# -*- coding: utf-8 -*-

from django.conf import settings
from django.db import models
from djutils.utils.helpers import load_class

#==============================================================================
# Get the category model
#==============================================================================
CATEGORY_MODEL = getattr(settings, 'CATEGORY_MODEL', 'hub.categories.defaults.category.Category')
Category = load_class(CATEGORY_MODEL)
def get_queue_class():
    return load_class(getattr(
        settings, 'QUEUE_CLASS', 'djutils.queue.backends.database.DatabaseQueue'
    ))
Ejemplo n.º 3
0
# -*- coding: utf-8 -*-
"""
This overrides the Cart model with the class loaded from the
SHOP_CART_MODEL setting if it exists.
"""
from django.conf import settings
from django.db import models
from djutils.utils.helpers import load_class

#==============================================================================
# Get the project model
#==============================================================================
SHOP_CART_MODEL = getattr(settings, 'SHOP_CART_MODEL', 'shop.cart.defaults.models.Cart')
Cart = load_class(SHOP_CART_MODEL)

SHOP_CARTITEM_MODEL = getattr(settings, 'SHOP_CARTITEM_MODEL', 'shop.cart.defaults.models.CartItem')
CartItem = load_class(SHOP_CARTITEM_MODEL)
Ejemplo n.º 4
0
# -*- coding: utf-8 -*-

from django.conf import settings
from django.db import models
from djutils.utils.helpers import load_class

#==============================================================================
# Get the category model
#==============================================================================
SHOP_CATEGORY_MODEL = getattr(settings, 'SHOP_CATEGORY_MODEL', 'shop.category.defaults.category.Category')
Category = load_class(SHOP_CATEGORY_MODEL)
Ejemplo n.º 5
0
# -*- coding: utf-8 -*-
"""
This overrides the Address model with the class loaded from the
SHOP_PRODUCT_MODEL setting if it exists.
"""
from django.conf import settings
from django.db import models
from djutils.utils.helpers import load_class

#==============================================================================
# Get the project model
#==============================================================================
ADDRESS_MODEL = getattr(settings, 'SHOP_ADDRESS_MODEL', 'shop.address.defaults.models.Address')
Address = load_class(ADDRESS_MODEL)
Ejemplo n.º 6
0
def get_queue_class():
    return load_class(
        getattr(settings, 'QUEUE_CLASS',
                'djutils.queue.backends.database.DatabaseQueue'))
Ejemplo n.º 7
0
# -*- coding: utf-8 -*-
"""
This overrides the Product model with the class loaded from the
SHOP_PRODUCT_MODEL setting if it exists.
"""
from django.conf import settings
from django.db import models
from djutils.utils.helpers import load_class

#==============================================================================
# Get the project model
#==============================================================================
ORDER_MODEL = getattr(settings, 'SHOP_ORDER_MODEL', 'shop.order.defaults.models.Order')
Order = load_class(ORDER_MODEL)
Ejemplo n.º 8
0
# -*- coding: utf-8 -*-
"""
This overrides the Product model with the class loaded from the
SHOP_PRODUCT_MODEL setting if it exists.
"""
from django.conf import settings
from django.db import models
from djutils.utils.helpers import load_class

#==============================================================================
# Get the project model
#==============================================================================
PRODUCT_MODEL = getattr(settings, 'SHOP_PRODUCT_MODEL', 'shop.products.defaults.product.Product')
Product = load_class(PRODUCT_MODEL)

VARIANT_MODEL = getattr(settings, 'SHOP_VARIANT_MODEL', 'shop.products.defaults.product.Variant')
Variant = load_class(VARIANT_MODEL)