# Path: shopkit/brands/settings.py
# BRAND_MODEL = getattr(settings, 'SHOPKIT_BRAND_MODEL')
# 
# BRAND_REQUIRED = getattr(settings, 'SHOPKIT_BRAND_REQUIRED', True)


from django.db import models
from django.utils.translation import ugettext_lazy as _
from shopkit.brands.settings import BRAND_MODEL, BRAND_REQUIRED
# You should have received a copy of the GNU Affero General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.




class BrandBase(models.Model):
    """ 
    Abstract base class for brands. Use like this::
    
        class Brand(BrandBase, OrderedItemBase, NamedItemBase):
            pass
    
    .. todo::
        Add methods for listing all available products (using the `in_shop`
        manager) for a given brand.
    """
    
    class Meta:
        abstract = True


class BrandedProductMixin(models.Model):
    """ Mixin for product classes with a relation to brand. """
    
    class Meta:
        abstract = True
    
    brand = models.ForeignKey(BRAND_MODEL, verbose_name=_('brand'),

# Path: shopkit/brands/settings.py
# BRAND_MODEL = getattr(settings, 'SHOPKIT_BRAND_MODEL')
# 
# BRAND_REQUIRED = getattr(settings, 'SHOPKIT_BRAND_REQUIRED', True)


# Path: shopkit/brands/models.py
from django.db import models
from django.utils.translation import ugettext_lazy as _
from shopkit.brands.settings import BRAND_MODEL, BRAND_REQUIRED

# You should have received a copy of the GNU Affero General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.




class BrandBase(models.Model):
    """ 
    Abstract base class for brands. Use like this::
    
        class Brand(BrandBase, OrderedItemBase, NamedItemBase):
            pass
    
    .. todo::
        Add methods for listing all available products (using the `in_shop`
        manager) for a given brand.
    """
    
    class Meta:
        abstract = True


class BrandedProductMixin(models.Model):
    """ Mixin for product classes with a relation to brand. """
    
    class Meta:
        abstract = True
    
    brand = models.ForeignKey(BRAND_MODEL, verbose_name=_('brand'),

                              null=not BRAND_REQUIRED,