"""
Django settings for lap project.

Generated by 'django-admin startproject' using Django 1.10.6.

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

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

import os

# 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/

DEBUG = os.environ.get('DEBUG', 'on') == 'on'
SECRET_KEY = os.environ.get('SECRET_KEY', os.urandom(32))

ALLOWED_HOSTS = ['0.0.0.0']

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = BASE_DIR + '/ihc-static/'

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    BASE_DIR + '/IHC/static/',
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    #'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'rest_framework',
    'analytics.apps.AnalyticsConfig',
    'authenticate'
]

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 = 'lap.urls'
LOGIN_URL = '/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_SAVE_EVERY_REQUEST = True
SESSION_COOKIE_AGE = 900  # seconds

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            BASE_DIR + '/templates',
            BASE_DIR + '/authenticate/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',
            ],
        },
    },
]

WSGI_APPLICATION = 'lap.wsgi.application'


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

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



# 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 = '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.10/howto/static-files/

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

# STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = '/static/'
MEDIA_ROOT = BASE_DIR + '/media/'
MEDIA_URL= '/media/'

@@ -455,17 +455,16 @@
 e__)))%0A%0A
-%0A
 # Quick-
@@ -1396,12 +1396,8 @@
 + '/
-IHC/
 stat
@@ -1637,73 +1637,8 @@
 der'
-,%0A    #'django.contrib.staticfiles.finders.DefaultStorageFinder',
 %0A)%0A%0A
@@ -1946,16 +1946,38 @@
 nticate'
+,%0A    'django_filters'
 %0A%5D%0A%0AMIDD
@@ -3168,17 +3168,16 @@
 ation'%0A%0A
-%0A
 # Databa
@@ -3388,17 +3388,16 @@
   %7D%0A%7D%0A%0A%0A
-%0A
 # Passwo
@@ -3920,418 +3920,522 @@
 %0A%5D%0A%0A
-%0A# Internationalization%0A# https://docs.djangoproject.com/en/1.10/topics/i18n/%0A%0ALANGUAGE_CODE = 'en-us'%0A%0ATIME_ZONE = 'UTC'%0A%0AUSE_I18N = True%0A%0AUSE_L10N = True%0A%0AUSE_TZ = True%0A%0A%0A# Static files (CSS, JavaScript, Images)%0A# https://docs.djangoproject.com/en/1.10/howto/static-files/%0A%0ASTATICFILES_DIRS = %5B%0A    os.path.join(BASE_DIR, %22static%22),%0A%5D%0A%0A# STATIC_ROOT = os.path.join(BASE_DIR, %22static%22)%0ASTATIC_URL = '/static/'
+REST_FRAMEWORK = %7B%0A    'PAGINATE_BY': None,%0A    'PAGINATE_BY_PARAM': 'paginate_by',%0A    'DEFAULT_AUTHENTICATION_CLASSES': (%0A        'rest_framework.authentication.SessionAuthentication',%0A        'rest_framework.authentication.TokenAuthentication',%0A    ),%0A    'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',)%0A%7D%0A%0A# Internationalization%0A# https://docs.djangoproject.com/en/1.10/topics/i18n/%0A%0ALANGUAGE_CODE = 'en-us'%0A%0ATIME_ZONE = 'UTC'%0A%0AUSE_I18N = True%0A%0AUSE_L10N = True%0A%0AUSE_TZ = True%0A
 %0AMED
@@ -4474,16 +4474,17 @@
 EDIA_URL
+ 
 = '/medi

update settings example