import os

from . import local_settings as ls

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = ls.SECRET_KEY

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = ls.DEBUG

ALLOWED_HOSTS = ls.ALLOWED_HOSTS


# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'apps.shop',
    'apps.cart',
    'apps.orders',
    'apps.accounts',
    'apps.coupons',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = '_project.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                'apps.cart.context_processors.cart',
            ],
        },
    },
]

WSGI_APPLICATION = '_project.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': ls.DB_NAME,
        'USER': ls.DB_USER,
        'PASSWORD': ls.DB_PASSWORD,
        'HOST': ls.DB_HOST,
        'PORT': ls.DB_PORT
    }
}


# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/

LANGUAGE_CODE = 'uk_UA'

TIME_ZONE = 'Europe/Kiev'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/

STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static"), ]

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, '..', 'media')

CART_SESSION_ID = 'cart'

@@ -4,16 +4,73 @@
 ort os%0A%0A
+from django.utils.translation import ugettext_lazy as _%0A%0A
 from . i
@@ -1041,32 +1041,81 @@
 ionMiddleware',%0A
+    'django.middleware.locale.LocaleMiddleware',%0A
     'django.midd
@@ -1896,24 +1896,83 @@
 .messages',%0A
+                'django.template.context_processors.i18n',%0A
             
@@ -2555,33 +2555,24 @@
 RS = %5B%0A    %7B
-%0A        
 'NAME': 'dja
@@ -2608,16 +2608,32 @@
 idation.
+'%0A             '
 UserAttr
@@ -2650,36 +2650,32 @@
 arityValidator',
-%0A   
  %7D,%0A    %7B%0A      
@@ -2663,33 +2663,24 @@
 r', %7D,%0A    %7B
-%0A        
 'NAME': 'dja
@@ -2716,16 +2716,32 @@
 idation.
+'%0A             '
 MinimumL
@@ -2748,36 +2748,32 @@
 engthValidator',
-%0A   
  %7D,%0A    %7B%0A      
@@ -2761,33 +2761,24 @@
 r', %7D,%0A    %7B
-%0A        
 'NAME': 'dja
@@ -2814,16 +2814,32 @@
 idation.
+'%0A             '
 CommonPa
@@ -2851,28 +2851,24 @@
 dValidator',
-%0A   
  %7D,%0A    %7B%0A  
@@ -2864,25 +2864,16 @@
 %7D,%0A    %7B
-%0A        
 'NAME': 
@@ -2913,16 +2913,32 @@
 idation.
+'%0A             '
 NumericP
@@ -2955,20 +2955,16 @@
 idator',
-%0A   
  %7D,%0A%5D%0A%0A%0A
@@ -3065,17 +3065,16 @@
 'uk_UA'%0A
-%0A
 TIME_ZON
@@ -3091,17 +3091,16 @@
 e/Kiev'%0A
-%0A
 USE_I18N
@@ -3103,25 +3103,24 @@
 I18N = True%0A
-%0A
 USE_L10N = T
@@ -3123,17 +3123,16 @@
  = True%0A
-%0A
 USE_TZ =
@@ -3138,16 +3138,143 @@
 = True%0A%0A
+LOCALE_PATHS = (os.path.join(BASE_DIR, 'locale'), )%0ALANGUAGES = (%0A    # ('en', _('English')),%0A    ('uk_UA', _('Ukrainian')),%0A)%0A
 %0A# Stati

Add basic settings for i18n