Beispiel #1
0

def Address(value):  # NOQA
    class Address(value):

        objects = _customer.models.AddressManager.from_queryset(
            _customer.models.AddressQuerySet)()

        class Meta(value.Meta):
            pass

    return Address


_customer.models['AddressQuerySet'].inject(
    inherit_class(lambda: _customer.models.AddresseeQuerySet, ))

_customer.models['AddressManager'].inject(
    inherit_class(lambda: _customer.models.AddresseeManager))

_customer.models['Address'].inject(
    inherit_model(lambda: _customer.models.Addressee))

_customer.models['Address'].inject(Address)


def Customer(value):  # NOQA
    class Customer(value):

        objects = _customer.models.CustomerManager.from_queryset(
            _customer.models.CustomerQuerySet)()
Beispiel #2
0

def Address(value): # NOQA
    class Address(value):

        objects = _customer.models.AddressManager.from_queryset(
            _customer.models.AddressQuerySet)()

        class Meta(value.Meta):
            pass

    return Address


_customer.models['AddressQuerySet'].inject(inherit_class(
    lambda: _customer.models.AddresseeQuerySet,
))

_customer.models['AddressManager'].inject(inherit_class(
    lambda: _customer.models.AddresseeManager
))

_customer.models['Address'].inject(inherit_model(
    lambda: _customer.models.Addressee
))

_customer.models['Address'].inject(Address)


def Customer(value): # NOQA
    class Customer(value):
Beispiel #3
0
        class Meta(value.Meta):
            abstract = True

    return ProductRelatable

_product.models['ProductRelatable'].inject(ProductRelatable)


_cart.forms['AddToCartForm'].inject(mixin_class(
    lambda : partials.AddToCartForm
))


_product.indexes['ProductSearchQuerySet'].inject(inherit_class(
    lambda : _pricing.indexes.PriceSearchQuerySet
))

_product.indexes['ProductIndex'].inject(inherit_class(
    lambda : _pricing.indexes.PriceIndex
))

def ProductIndex(value):

    class ProductIndex(value):
        SearchQuerySet = _product.indexes.ProductSearchQuerySet
        model = _product.models.Product

    return ProductIndex