# Path: shopkit/core/settings.py
# MAX_NAME_LENGTH = getattr(settings, 'SHOPKIT_MAX_NAME_LENGTH', 255)
# 
# Path: shopkit/core/managers.py
# class ActiveItemManager(models.Manager):
#     """ 
#     Manager returning only activated items, ideally for subclasses of
#     :class:`AbstractActiveItemBase <shopkit.core.basemodels.AbstractActiveItemBase>`. 
#     """
# 
#     def get_query_set(self):
#         """ Filter the original queryset so it returns only items with
#             `active=True`.
#         """
#         qs = super(ActiveItemManager, self).get_query_set()
#         qs = qs.filter(active=True)
# 
#         return qs


import logging
import datetime
from django.utils.translation import ugettext_lazy as _
from django.db import models
from shopkit.core.settings import MAX_NAME_LENGTH
from shopkit.core.managers import ActiveItemManager
    class Meta:
        abstract = True

    def get_price(self, **kwargs):
        """ Get price for the current product.

            This method _should_ be implemented in a subclass. """

        raise NotImplementedError


class QuantizedItemBase(models.Model):
    """ Abstract base class for items with a quantity field. """

    class Meta:
        abstract = True

    quantity = models.IntegerField(default=0, verbose_name=_('quantity'))
    """ Number of items of this kind. The default is 0: this is necessary so
    that we can add a certain quantity to a new object without knowing its
    initial value.
    """


class NamedItemBase(models.Model):
    """ Abstract base class for items with a name. """

    class Meta:
        abstract = True


# Path: shopkit/core/settings.py
# MAX_NAME_LENGTH = getattr(settings, 'SHOPKIT_MAX_NAME_LENGTH', 255)
# 
# Path: shopkit/core/managers.py
# class ActiveItemManager(models.Manager):
#     """ 
#     Manager returning only activated items, ideally for subclasses of
#     :class:`AbstractActiveItemBase <shopkit.core.basemodels.AbstractActiveItemBase>`. 
#     """
# 
#     def get_query_set(self):
#         """ Filter the original queryset so it returns only items with
#             `active=True`.
#         """
#         qs = super(ActiveItemManager, self).get_query_set()
#         qs = qs.filter(active=True)
# 
#         return qs


# Path: shopkit/core/basemodels.py
import logging
import datetime
from django.utils.translation import ugettext_lazy as _
from django.db import models
from shopkit.core.settings import MAX_NAME_LENGTH
from shopkit.core.managers import ActiveItemManager

    class Meta:
        abstract = True

    def get_price(self, **kwargs):
        """ Get price for the current product.

            This method _should_ be implemented in a subclass. """

        raise NotImplementedError


class QuantizedItemBase(models.Model):
    """ Abstract base class for items with a quantity field. """

    class Meta:
        abstract = True

    quantity = models.IntegerField(default=0, verbose_name=_('quantity'))
    """ Number of items of this kind. The default is 0: this is necessary so
    that we can add a certain quantity to a new object without knowing its
    initial value.
    """


class NamedItemBase(models.Model):
    """ Abstract base class for items with a name. """

    class Meta:
        abstract = True


    name = models.CharField(max_length=MAX_NAME_LENGTH,