from wshop.apps.shipping import abstract_models from wshop.core.loading import is_model_registered __all__ = [] if not is_model_registered('shipping', 'OrderAndItemCharges'): class OrderAndItemCharges(abstract_models.AbstractOrderAndItemCharges): pass __all__.append('OrderAndItemCharges') if not is_model_registered('shipping', 'WeightBased'): class WeightBased(abstract_models.AbstractWeightBased): pass __all__.append('WeightBased') if not is_model_registered('shipping', 'WeightBand'): class WeightBand(abstract_models.AbstractWeightBand): pass __all__.append('WeightBand')
from wshop.apps.voucher.abstract_models import (AbstractVoucher, AbstractVoucherApplication, AbstractVoucherSet) from wshop.core.loading import is_model_registered __all__ = [] if not is_model_registered('voucher', 'VoucherSet'): class VoucherSet(AbstractVoucherSet): pass __all__.append('VoucherSet') if not is_model_registered('voucher', 'Voucher'): class Voucher(AbstractVoucher): pass __all__.append('Voucher') if not is_model_registered('voucher', 'VoucherApplication'): class VoucherApplication(AbstractVoucherApplication): pass __all__.append('VoucherApplication')
from wshop.apps.address.abstract_models import ( AbstractBillingAddress, AbstractShippingAddress) from wshop.apps.order.abstract_models import * # noqa from wshop.core.loading import is_model_registered __all__ = ['PaymentEventQuantity', 'ShippingEventQuantity'] if not is_model_registered('order', 'Order'): class Order(AbstractOrder): pass __all__.append('Order') if not is_model_registered('order', 'OrderNote'): class OrderNote(AbstractOrderNote): pass __all__.append('OrderNote') if not is_model_registered('order', 'CommunicationEvent'): class CommunicationEvent(AbstractCommunicationEvent): pass __all__.append('CommunicationEvent') if not is_model_registered('order', 'ShippingAddress'): class ShippingAddress(AbstractShippingAddress):
from wshop.apps.offer.abstract_models import ( AbstractBenefit, AbstractCondition, AbstractConditionalOffer, AbstractRange, AbstractRangeProduct, AbstractRangeProductFileUpload) from wshop.apps.offer.results import ( SHIPPING_DISCOUNT, ZERO_DISCOUNT, BasketDiscount, PostOrderAction, ShippingDiscount) from wshop.core.loading import is_model_registered __all__ = [ 'BasketDiscount', 'ShippingDiscount', 'PostOrderAction', 'SHIPPING_DISCOUNT', 'ZERO_DISCOUNT' ] if not is_model_registered('offer', 'ConditionalOffer'): class ConditionalOffer(AbstractConditionalOffer): pass __all__.append('ConditionalOffer') if not is_model_registered('offer', 'Benefit'): class Benefit(AbstractBenefit): pass __all__.append('Benefit') if not is_model_registered('offer', 'Condition'): class Condition(AbstractCondition): pass
from wshop.apps.address.abstract_models import ( AbstractCountry, AbstractUserAddress) from wshop.core.loading import is_model_registered __all__ = [] if not is_model_registered('address', 'UserAddress'): class UserAddress(AbstractUserAddress): pass __all__.append('UserAddress') if not is_model_registered('address', 'Country'): class Country(AbstractCountry): pass __all__.append('Country')
from wshop.apps.basket.abstract_models import (AbstractBasket, AbstractLine, AbstractLineAttribute) from wshop.core.loading import is_model_registered __all__ = [ 'InvalidBasketLineError', ] class InvalidBasketLineError(Exception): pass if not is_model_registered('basket', 'Basket'): class Basket(AbstractBasket): pass __all__.append('Basket') if not is_model_registered('basket', 'Line'): class Line(AbstractLine): pass __all__.append('Line') if not is_model_registered('basket', 'LineAttribute'): class LineAttribute(AbstractLineAttribute): pass
""" Vanilla product models """ from wshop.apps.catalogue.abstract_models import * # noqa from wshop.core.loading import is_model_registered __all__ = ['ProductAttributesContainer'] 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'):
from wshop.core.loading import is_model_registered from . import abstract_models __all__ = [] if not is_model_registered('payment', 'Transaction'): class Transaction(abstract_models.AbstractTransaction): pass __all__.append('Transaction') if not is_model_registered('payment', 'Source'): class Source(abstract_models.AbstractSource): pass __all__.append('Source') if not is_model_registered('payment', 'SourceType'): class SourceType(abstract_models.AbstractSourceType): pass __all__.append('SourceType') if not is_model_registered('payment', 'Bankcard'): class Bankcard(abstract_models.AbstractBankcard): pass
from wshop.apps.customer import abstract_models from wshop.core.loading import is_model_registered __all__ = [] if not is_model_registered('customer', 'Email'): class Email(abstract_models.AbstractEmail): pass __all__.append('Email') if not is_model_registered('customer', 'CommunicationEventType'): class CommunicationEventType(abstract_models.AbstractCommunicationEventType ): pass __all__.append('CommunicationEventType') if not is_model_registered('customer', 'Notification'): class Notification(abstract_models.AbstractNotification): pass __all__.append('Notification') if not is_model_registered('customer', 'ProductAlert'): class ProductAlert(abstract_models.AbstractProductAlert): pass
from wshop.apps.analytics.abstract_models import (AbstractProductRecord, AbstractUserProductView, AbstractUserRecord, AbstractUserSearch) from wshop.core.loading import is_model_registered __all__ = [] if not is_model_registered('analytics', 'ProductRecord'): class ProductRecord(AbstractProductRecord): pass __all__.append('ProductRecord') if not is_model_registered('analytics', 'UserRecord'): class UserRecord(AbstractUserRecord): pass __all__.append('UserRecord') if not is_model_registered('analytics', 'UserProductView'): class UserProductView(AbstractUserProductView): pass __all__.append('UserProductView') if not is_model_registered('analytics', 'UserSearch'):
from wshop.apps.catalogue.reviews.abstract_models import ( AbstractProductReview, AbstractVote) from wshop.core.loading import is_model_registered if not is_model_registered('reviews', 'ProductReview'): class ProductReview(AbstractProductReview): pass if not is_model_registered('reviews', 'Vote'): class Vote(AbstractVote): pass
# -*- coding: utf-8 -*- from wshop.core.loading import is_model_registered from .abstract_models import * # noqa __all__ = [] if not is_model_registered('wishlists', 'WishList'): class WishList(AbstractWishList): pass __all__.append('WishList') if not is_model_registered('wishlists', 'Line'): class Line(AbstractLine): pass __all__.append('Line')
from wshop.apps.address.abstract_models import AbstractPartnerAddress from wshop.apps.partner.abstract_models import (AbstractPartner, AbstractStockAlert, AbstractStockRecord) from wshop.core.loading import is_model_registered __all__ = [] if not is_model_registered('partner', 'Partner'): class Partner(AbstractPartner): pass __all__.append('Partner') if not is_model_registered('partner', 'PartnerAddress'): class PartnerAddress(AbstractPartnerAddress): pass __all__.append('PartnerAddress') if not is_model_registered('partner', 'StockRecord'): class StockRecord(AbstractStockRecord): pass __all__.append('StockRecord') if not is_model_registered('partner', 'StockAlert'):