# Path: catalog/settings.py
# DATETIME_INPUT_FOMRAT = '%Y-%m-%d %H:%M:%S'
# DATE_INPUT_FOMRAT = '%Y-%m-%d'
# SLUG_FIELD_HELP_TEXT = _(
#     'Can only contain the letters a-z, A-Z, digits, minus and underscores, '
#     'and can\'t start with a digit.')
# UNDERSCORE_FIELD_HELP_TEXT = _(
#     'Can only contain the letters a-z, A-Z, digits and underscores, '
#     'and can\'t start with a digit.')
# ACTIVE_FIELD_HELP_TEXT = _(
#     'Is this object active? You can hide it by unchecking this box.')
# PRODUCT_CHANGE_FORM_TEMPLATE = (
#     'admin/catalog/product_change_form.html')
# ATTRIBUTE_TEMPLATE_CHOICES = getattr(
#     settings, 'CATALOG_ATTRIBUTE_TEMPLATE_CHOICES', (
#         ('radio', _('Radio')),
#     ))
# RELATED_PRODUCT_KIND_CHOICES = getattr(
#     settings, 'CATALOG_RELATED_PRODUCT_KIND_CHOICES', (
#         ('upsell', _('Upsell')),
#         ('cross_sell', _('Cross sell')),
#     ))
# PRODUCTS_PER_PAGE = getattr(settings, 'CATALOG_PRODUCTS_PER_PAGE', 6)
# HAS_CATEGORIES = getattr(settings, 'CATALOG_HAS_CATEGORIES', True)
# HAS_BRANDS = getattr(settings, 'CATALOG_HAS_BRANDS', True)
# HAS_MANUFACTURERS = getattr(settings, 'CATALOG_HAS_MANUFACTURERS', True)
# HAS_MODIFIER_CODES = getattr(settings, 'CATALOG_HAS_MODIFIER_CODES', True)
# PRODUCT_URL = getattr(
#     settings, 'CATALOG_PRODUCT_URL', 'products')
# CATEGORY_URL = getattr(
#     settings, 'CATALOG_CATEGORY_URL', 'categories')
# BRAND_URL = getattr(
#     settings, 'CATALOG_BRAND_URL', 'brands')
# MANUFACTURER_URL = getattr(
#     settings, 'CATALOG_MANUFACTURER_URL', 'manufacturers')
# MEASUREMENT_UNITS = getattr(settings, 'CATALOG_MEASUREMENT_UNITS', [])
# MODIFIER_CONDITIONS = getattr(settings, 'CATALOG_MODIFIER_CONDITIONS', [
#     'catalog.modifier_conditions.PriceGreaterThanModifierCondition',
#     'catalog.modifier_conditions.PriceLessThanModifierCondition',
#     'catalog.modifier_conditions.QuantityGreaterThanModifierCondition',
#     'catalog.modifier_conditions.QuantityLessThanModifierCondition',
#     'catalog.modifier_conditions.WidthGreaterThanModifierCondition',
#     'catalog.modifier_conditions.WidthLessThanModifierCondition',
#     'catalog.modifier_conditions.HeightGreaterThanModifierCondition',
#     'catalog.modifier_conditions.HeightLessThanModifierCondition',
#     'catalog.modifier_conditions.DepthGreaterThanModifierCondition',
#     'catalog.modifier_conditions.DepthLessThanModifierCondition',
#     'catalog.modifier_conditions.WeightGreaterThanModifierCondition',
#     'catalog.modifier_conditions.WeightLessThanModifierCondition',
# ])


from django.db import models
from django.core.validators import RegexValidator
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import python_2_unicode_compatible
from shop.addressmodel.models import USER_MODEL
from catalog import settings as scs
        verbose_name_plural = _('Countries')
        ordering = ('name', )


@python_2_unicode_compatible
class Address(models.Model):
    user_shipping = models.OneToOneField(
        USER_MODEL, blank=True, null=True,
        related_name='catalog_shipping_address',
        verbose_name=_('User shipping'))

    user_billing = models.OneToOneField(
        USER_MODEL, blank=True, null=True,
        related_name='catalog_billing_address',
        verbose_name=_('User billing'))

    name = models.CharField(_('Name'), max_length=255)
    email = models.EmailField(_('Email'), max_length=255)
    address = models.CharField(_('Address'), max_length=255)
    address2 = models.CharField(_('Address 2'), max_length=255, blank=True)
    zip_code = models.CharField(_('Zip Code'), max_length=20)
    city = models.CharField(_('City'), max_length=20)
    state = models.CharField(_('State'), max_length=255)
    country = models.ForeignKey(
        Country, verbose_name=_('Country'),
        limit_choices_to={'active': True, 'region__active': True})

    phone_number = models.CharField(
        _('Phone number'), max_length=16, blank=True, validators=[
            RegexValidator(r'^\+?1?\d{9,15}$',

# Path: catalog/settings.py
# DATETIME_INPUT_FOMRAT = '%Y-%m-%d %H:%M:%S'
# DATE_INPUT_FOMRAT = '%Y-%m-%d'
# SLUG_FIELD_HELP_TEXT = _(
#     'Can only contain the letters a-z, A-Z, digits, minus and underscores, '
#     'and can\'t start with a digit.')
# UNDERSCORE_FIELD_HELP_TEXT = _(
#     'Can only contain the letters a-z, A-Z, digits and underscores, '
#     'and can\'t start with a digit.')
# ACTIVE_FIELD_HELP_TEXT = _(
#     'Is this object active? You can hide it by unchecking this box.')
# PRODUCT_CHANGE_FORM_TEMPLATE = (
#     'admin/catalog/product_change_form.html')
# ATTRIBUTE_TEMPLATE_CHOICES = getattr(
#     settings, 'CATALOG_ATTRIBUTE_TEMPLATE_CHOICES', (
#         ('radio', _('Radio')),
#     ))
# RELATED_PRODUCT_KIND_CHOICES = getattr(
#     settings, 'CATALOG_RELATED_PRODUCT_KIND_CHOICES', (
#         ('upsell', _('Upsell')),
#         ('cross_sell', _('Cross sell')),
#     ))
# PRODUCTS_PER_PAGE = getattr(settings, 'CATALOG_PRODUCTS_PER_PAGE', 6)
# HAS_CATEGORIES = getattr(settings, 'CATALOG_HAS_CATEGORIES', True)
# HAS_BRANDS = getattr(settings, 'CATALOG_HAS_BRANDS', True)
# HAS_MANUFACTURERS = getattr(settings, 'CATALOG_HAS_MANUFACTURERS', True)
# HAS_MODIFIER_CODES = getattr(settings, 'CATALOG_HAS_MODIFIER_CODES', True)
# PRODUCT_URL = getattr(
#     settings, 'CATALOG_PRODUCT_URL', 'products')
# CATEGORY_URL = getattr(
#     settings, 'CATALOG_CATEGORY_URL', 'categories')
# BRAND_URL = getattr(
#     settings, 'CATALOG_BRAND_URL', 'brands')
# MANUFACTURER_URL = getattr(
#     settings, 'CATALOG_MANUFACTURER_URL', 'manufacturers')
# MEASUREMENT_UNITS = getattr(settings, 'CATALOG_MEASUREMENT_UNITS', [])
# MODIFIER_CONDITIONS = getattr(settings, 'CATALOG_MODIFIER_CONDITIONS', [
#     'catalog.modifier_conditions.PriceGreaterThanModifierCondition',
#     'catalog.modifier_conditions.PriceLessThanModifierCondition',
#     'catalog.modifier_conditions.QuantityGreaterThanModifierCondition',
#     'catalog.modifier_conditions.QuantityLessThanModifierCondition',
#     'catalog.modifier_conditions.WidthGreaterThanModifierCondition',
#     'catalog.modifier_conditions.WidthLessThanModifierCondition',
#     'catalog.modifier_conditions.HeightGreaterThanModifierCondition',
#     'catalog.modifier_conditions.HeightLessThanModifierCondition',
#     'catalog.modifier_conditions.DepthGreaterThanModifierCondition',
#     'catalog.modifier_conditions.DepthLessThanModifierCondition',
#     'catalog.modifier_conditions.WeightGreaterThanModifierCondition',
#     'catalog.modifier_conditions.WeightLessThanModifierCondition',
# ])


# Path: catalog/addresses/models.py
from django.db import models
from django.core.validators import RegexValidator
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import python_2_unicode_compatible
from shop.addressmodel.models import USER_MODEL
from catalog import settings as scs

        verbose_name_plural = _('Countries')
        ordering = ('name', )


@python_2_unicode_compatible
class Address(models.Model):
    user_shipping = models.OneToOneField(
        USER_MODEL, blank=True, null=True,
        related_name='catalog_shipping_address',
        verbose_name=_('User shipping'))

    user_billing = models.OneToOneField(
        USER_MODEL, blank=True, null=True,
        related_name='catalog_billing_address',
        verbose_name=_('User billing'))

    name = models.CharField(_('Name'), max_length=255)
    email = models.EmailField(_('Email'), max_length=255)
    address = models.CharField(_('Address'), max_length=255)
    address2 = models.CharField(_('Address 2'), max_length=255, blank=True)
    zip_code = models.CharField(_('Zip Code'), max_length=20)
    city = models.CharField(_('City'), max_length=20)
    state = models.CharField(_('State'), max_length=255)
    country = models.ForeignKey(
        Country, verbose_name=_('Country'),
        limit_choices_to={'active': True, 'region__active': True})

    phone_number = models.CharField(
        _('Phone number'), max_length=16, blank=True, validators=[
            RegexValidator(r'^\+?1?\d{9,15}$',

                           _('Phone number must be entered in the '