import sys, os

PROJECT_ROOT = os.path.dirname(__file__)

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

MONGODB_DATABASES = {
  # 'default': {'name': 'ftlcopy'}
  'default': {'name': 'ftlcopy', 'host': '52.77.232.185', 'port': 27017}
}

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '2xujs=vs^sngjq@sn=_gi1b-3)=n)@b4uy5908co($0d(5oesf'

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

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = [
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.messages',
  'django.contrib.staticfiles',
  'django.contrib.admin',

  'django_mongoengine',
  'django_mongoengine.mongo_auth',
  'django_mongoengine.mongo_admin.sites',
  'django_mongoengine.mongo_admin',
  
  'bootstrap3',

  'raw_data',
  'industries',
  'companies',
  'users',
  'management_level',
]

MIDDLEWARE = [
  'django.middleware.common.CommonMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.csrf.CsrfViewMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.messages.middleware.MessageMiddleware',
]

ROOT_URLCONF = 'dbwork.urls'

TEMPLATES = [
  {
    'BACKEND': 'django.template.backends.django.DjangoTemplates',
    'DIRS': [os.path.join(os.path.realpath(os.path.dirname(__file__)), '../templates')],
    'OPTIONS': {
      'loaders': [
        'django.template.loaders.filesystem.Loader',
        'django.template.loaders.app_directories.Loader',
      ],
    },
  },
]

WSGI_APPLICATION = 'dbwork.wsgi.application'

DATABASES = {
  'default': {'ENGINE': 'django.db.backends.dummy'}
}

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',
  },
]

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True

STATIC_URL = '/static/'

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

STATICFILES_FINDERS = (
  'django.contrib.staticfiles.finders.FileSystemFinder',
  'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

AUTH_USER_MODEL = 'mongo_auth.MongoUser'

AUTHENTICATION_BACKENDS = (
  'django_mongoengine.mongo_auth.backends.MongoEngineBackend',
)

SESSION_ENGINE = 'django_mongoengine.sessions'

MEDIA_URL = ''

MEDIA_ROOT = ''
