| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- import django
-
- """
- Vanilla product models
- """
- from oscar.core.loading import is_model_registered
- from oscar.apps.catalogue.abstract_models import * # noqa
-
- __all__ = []
-
-
- if not is_model_registered('catalogue', 'ProductClass'):
- class ProductClass(AbstractProductClass):
- pass
-
- __all__.append('ProductClass')
-
-
- if not is_model_registered('catalogue', 'Category'):
- class Category(AbstractCategory):
- pass
-
- __all__.append('Category')
-
-
- if not is_model_registered('catalogue', 'ProductCategory'):
- class ProductCategory(AbstractProductCategory):
- pass
-
- __all__.append('ProductCategory')
-
-
- if not is_model_registered('catalogue', 'Product'):
- class Product(AbstractProduct):
- pass
-
- __all__.append('Product')
-
-
- if not is_model_registered('catalogue', 'ProductRecommendation'):
- class ProductRecommendation(AbstractProductRecommendation):
- pass
-
- __all__.append('ProductRecommendation')
-
-
- if not is_model_registered('catalogue', 'ProductAttribute'):
- class ProductAttribute(AbstractProductAttribute):
- pass
-
- __all__.append('ProductAttribute')
-
-
- if not is_model_registered('catalogue', 'ProductAttributeValue'):
- class ProductAttributeValue(AbstractProductAttributeValue):
- pass
-
- __all__.append('ProductAttributeValue')
-
-
- if not is_model_registered('catalogue', 'AttributeOptionGroup'):
- class AttributeOptionGroup(AbstractAttributeOptionGroup):
- pass
-
- __all__.append('AttributeOptionGroup')
-
-
- if not is_model_registered('catalogue', 'AttributeOption'):
- class AttributeOption(AbstractAttributeOption):
- pass
-
- __all__.append('AttributeOption')
-
-
- if not is_model_registered('catalogue', 'Option'):
- class Option(AbstractOption):
- pass
-
- __all__.append('Option')
-
-
- if not is_model_registered('catalogue', 'ProductImage'):
- class ProductImage(AbstractProductImage):
- pass
-
- __all__.append('ProductImage')
-
-
- if django.VERSION < (1, 7):
- from . import receivers # noqa
|