"""
Django settings for ituro project.

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

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
from django.utils.translation import ugettext_lazy as _
import os

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

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

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '303y*!pxg_ioragt=zzy4&-@kq^mxb-e=mlgu2m426%4ud35l='

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

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
    # Django apps
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    # 3rd party apps
    'bootstrap3',

    # ITURO apps
    'accounts',
    'projects',
)

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

ROOT_URLCONF = 'ituro.urls'

WSGI_APPLICATION = 'ituro.wsgi.application'


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

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

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

LANGUAGE_CODE = 'en'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True

LANGUAGES = (
    ('tr', _('Turkish')),
    ('en', _('English')),
)

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

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

STATIC_URL = '/static/'
STATIC_ROOT = os.path.abspath(
    os.path.join(BASE_DIR, os.pardir, "public", "static"))
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, "static"),
)
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.abspath(
    os.path.join(BASE_DIR, os.pardir, "public", "media"))

AUTH_USER_MODEL = "accounts.CustomUser"
TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
EMAIL_USE_TLS = True
MAX_FILE_SIZE = 1000000
LOGIN_REDIRECT_URL = "/"

ALL_CATEGORIES = (
    ('line_follower', _('Line Follower')),
    ('micro_sumo', _('Micro Sumo')),
    ('fire_fighter', _('Fire Fighter')),
    ('basketball', _('Basketball')),
    ('stair_climbing', _('Stair Climbing')),
    ('maze', _('Maze')),
    ('color_selecting', _('Color Selecting')),
    ('self_balancing', _('Self Balancing')),
    ('scenario', _('Scenario')),
    ('innovative', _('Innovative')),
)

# Import local settings
try:
    from local_settings import *
except ImportError:
    pass

@@ -2041,18 +2041,18 @@
 CODE = '
-en
+tr
 '%0ATIME_Z
@@ -3196,24 +3196,66 @@
 vative')),%0A)
+%0ACREATE_CATEGORIES = tuple(ALL_CATEGORIES)
 %0A%0A# Import l

add CREATE_CATEGORIES to settings, make tr default lang