"""
Django settings for TusPachangas 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/
"""
import django
import dj_database_url
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))

TEMPLATE_PATH = os.path.join(BASE_DIR, 'templates')

# 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 = '26*swq94+rg+-2tc2es6j&d#&(g4@@xe7vh1hu1)6*z^v@pd2q'

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

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'registration',	#add in the registration package
	'rest_framework',
	'restaurante',
	'easy_maps',
)

if django.VERSION < (1, 7):
    INSTALLED_APPS += (
        'south',
    )
    
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',
)

ROOT_URLCONF = 'ProyectoDAI.urls'

WSGI_APPLICATION = 'ProyectoDAI.wsgi.application'


TEMPLATE_DIRS = (TEMPLATE_PATH,)

# 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'),
    }
}
ON_HEROKU = os.environ.get('PORT')
if ON_HEROKU:
	DATABASE_URL='postgres://kytzveedsclzaf:eIJAAuElYvSxPK-vmSdXG9Hjv8@ec2-107-21-219-235.compute-1.amazonaws.com:5432/df9sfr7a9b8vjf'
	DATABASES = {'default': dj_database_url.config(default=DATABASE_URL)}
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


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

STATIC_URL = '/static/'

STATICFILES_DIRS = (
    STATIC_PATH,
)

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



[((14, 16, 14, 51), 'os.path.join', 'os.path.join', ({(14, 29, 14, 37): 'BASE_DIR', (14, 39, 14, 50): '"""templates"""'}, {}), "(BASE_DIR, 'templates')", False, 'import os\n'), ((76, 12, 76, 34), 'os.environ.get', 'os.environ.get', ({(76, 27, 76, 33): '"""PORT"""'}, {}), "('PORT')", False, 'import os\n'), ((96, 14, 96, 45), 'os.path.join', 'os.path.join', ({(96, 27, 96, 35): 'BASE_DIR', (96, 36, 96, 44): '"""static"""'}, {}), "(BASE_DIR, 'static')", False, 'import os\n'), ((106, 13, 106, 44), 'os.path.join', 'os.path.join', ({(106, 26, 106, 34): 'BASE_DIR', (106, 36, 106, 43): '"""media"""'}, {}), "(BASE_DIR, 'media')", False, 'import os\n'), ((12, 27, 12, 52), 'os.path.dirname', 'os.path.dirname', ({(12, 43, 12, 51): '__file__'}, {}), '(__file__)', False, 'import os\n'), ((73, 16, 73, 52), 'os.path.join', 'os.path.join', ({(73, 29, 73, 37): 'BASE_DIR', (73, 39, 73, 51): '"""db.sqlite3"""'}, {}), "(BASE_DIR, 'db.sqlite3')", False, 'import os\n'), ((79, 25, 79, 69), 'dj_database_url.config', 'dj_database_url.config', (), '', False, 'import dj_database_url\n')]