"""
Django settings for ticketsystem project.

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

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

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

######## SETTINGS SUITABLE FOR DEVELOPMENT ########
from .settings_dev import *

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['localhost']

#DIRECTORY AND URL FOR MEDIA (FileField in Models)
MEDIA_ROOT = os.path.join(BASE_DIR, 'C:/#DjangoApp/ticketsystem/media/')
MEDIA_URL = '/'

#LOGOUT USER ON BROWSER CLOSE
SESSION_EXPIRE_AT_BROWSER_CLOSE = True

#SET EXPIRATION AGE IN SECONDS
COOKIE_EXP_AGE = 30*60

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

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'djangodatabase',
        'USER': 'DjangoApp',
        'PASSWORD': 'testDjango',
        'HOST': 'localhost',
        'PORT': '',
    }
}

SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True
X_FRAME_OPTIONS = 'DENY'

STATIC_ROOT = os.path.join(BASE_DIR, 'C:/#DjangoApp/ticketsystem/static/')
STATICFILES_DIRS = [
        BASE_DIR+'/static/',
    ]