"""
Django settings for olgart project.

For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""

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


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

# SECURITY WARNING: keep the secret key used in production secret!
import json
with open( os.path.join(BASE_DIR, 'secrets.json') ) as fh:
	SECRET_KEY = json.load(fh)['SECRET_KEY']

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

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
	'modeltranslation',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
	'exhibitions',	
	'paintings',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
	'django.middleware.locale.LocaleMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'olgart.urls'

WSGI_APPLICATION = 'olgart.wsgi.application'

TEMPLATE_DIRS = (
	os.path.realpath(os.path.dirname(__file__)) + '/templates/',
)

TEMPLATE_CONTEXT_PROCESSORS = (
	"django.contrib.auth.context_processors.auth",
	"django.core.context_processors.debug",
	"django.core.context_processors.i18n",
	"django.core.context_processors.media",
    'django.core.context_processors.request',
	"django.core.context_processors.static",
	"django.core.context_processors.tz",
	"django.contrib.messages.context_processors.messages",
	"paintings.processors.get_Galleries",
	"paintings.processors.get_random_canvasOilPainting",
)


THUMBNAIL_SIZE = (400,200)


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

DATABASES = {
#    'default': {
#        'ENGINE': 'django.db.backends.sqlite3',
#        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
#    }
    'default': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'olgart',
    'USER': 'olgart',
    }
}

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

LANGUAGE_CODE = 'ru-ru'

TIME_ZONE = 'Europe/Moscow'

USE_I18N = True

USE_L10N = True

USE_TZ = True

#gettext = lambda s: s
from django.utils.translation import gettext
LANGUAGES = (
    ('ru', gettext('Russian')),
    ('en', gettext('English')),
)

LOCALE_PATHS = (
	os.path.join(BASE_DIR, 'locale'),
)


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATICFILES_DIRS = (
	os.path.join(BASE_DIR, 'static'),
)
STATIC_URL = '/static/'

# Uploaded Media:
MEDIA_ROOT = os.path.join(BASE_DIR, 'static/media')
MEDIA_URL = '/static/media/'

@@ -767,19 +767,20 @@
 DEBUG = 
-Tru
+Fals
 e%0A%0ATEMPL
@@ -791,19 +791,20 @@
 DEBUG = 
-Tru
+Fals
 e%0A%0AALLOW
@@ -815,16 +815,19 @@
 OSTS = %5B
+'*'
 %5D%0A%0A%0A# Ap
@@ -3033,46 +3033,15 @@
 ATIC
-FILES_DIRS = (%0A%09os.path.join(BASE_DIR,
+_ROOT =
  'st
@@ -3045,20 +3045,16 @@
 'static'
-),%0A)
 %0ASTATIC_

Add STATIC_ROOT to provide ./manage.py collectstatic command