"""
Django settings for mysite project.

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

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

#### start Heroku setup ####
## https://devcenter.heroku.com/articles/getting-started-with-django
# Parse database configuration from $DATABASE_URL

import dj_database_url
DATABASES['default'] =  dj_database_url.config()

# Honor the 'X-Forwarded-Proto' header for request.is_secure()
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

# Allow all host headers
ALLOWED_HOSTS = ['*']

# Static asset configuration
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'

STATICFILES_DIRS = (
        os.path.join(BASE_DIR, 'static'),
)
#### end Heroku setup




BASE_DIR = os.path.dirname(os.path.dirname(__file__))

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

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '-%xk%*rd(8ug7-#fcpd)e1cf$cyb-zh&b%(yq(5ixpb6hi@w9^'

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

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# auth
AUTHENTICATION_BACKENDS = (
    # Needed to login by username in Django admin, regardless of `allauth`
    "django.contrib.auth.backends.ModelBackend",
    # `allauth` specific authentication methods, such as login by e-mail
    "allauth.account.auth_backends.AuthenticationBackend"
)

# auth and allauth settings
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'

SOCIALACCOUNT_QUERY_EMAIL = True
# SOCIALACCOUNT_PROVIDERS = {
# 'facebook': {
# 'SCOPE': ['email', 'publish_stream'],
# 'METHOD': 'js_sdk'  # instead of 'oauth2'
# }
# }

# auth
TEMPLATE_CONTEXT_PROCESSORS = (
    # Required by allauth template tags
    "django.core.context_processors.request",
    # allauth specific context processors
    "django.contrib.auth.context_processors.auth",
    "allauth.account.context_processors.account",
    "allauth.socialaccount.context_processors.socialaccount",
)

# auth
AUTHENTICATION_BACKENDS = (
    # Needed to login by username in Django admin, regardless of `allauth`
    "django.contrib.auth.backends.ModelBackend",

    # `allauth` specific authentication methods, such as login by e-mail
    "allauth.account.auth_backends.AuthenticationBackend",
)

# Application definition
INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.webdesign',
    'accounts',
    'dproject',
    'mysite',
    # auth
    'django.contrib.sites',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.google',
    # 'bootstrapform', # comment out for heroku
    # forms
    # 'crispy_forms', # comment out for heroku
)

# forms
CRISPY_TEMPLATE_PACK = 'uni_form'

# auth
SITE_ID = 1

# auth
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

MIDDLEWARE_CLASSES = (
    '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 = 'mysite.urls'

WSGI_APPLICATION = 'mysite.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.6/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.6/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'America/New_York'

USE_I18N = True

USE_L10N = True

USE_TZ = True


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

STATIC_URL = '/static/'

# auth login prefs
ACCOUNT_AUTHENTICATION_METHOD  = 'username_email'
ACCOUNT_USERNAME_BLACKLIST = ['root',
                              'fake',
                              'bitch',
                              'ass',
                              'nigger',
                              'fuck',
                              'shit',
                              'admin',
                              'kngofwrld',
                             ]

@@ -252,637 +252,8 @@
 os%0A%0A
-#### start Heroku setup ####%0A## https://devcenter.heroku.com/articles/getting-started-with-django%0A# Parse database configuration from $DATABASE_URL%0A%0Aimport dj_database_url%0ADATABASES%5B'default'%5D =  dj_database_url.config()%0A%0A# Honor the 'X-Forwarded-Proto' header for request.is_secure()%0ASECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')%0A%0A# Allow all host headers%0AALLOWED_HOSTS = %5B'*'%5D%0A%0A# Static asset configuration%0Aimport os%0ABASE_DIR = os.path.dirname(os.path.abspath(__file__))%0ASTATIC_ROOT = 'staticfiles'%0ASTATIC_URL = '/static/'%0A%0ASTATICFILES_DIRS = (%0A        os.path.join(BASE_DIR, 'static'),%0A)%0A#### end Heroku setup%0A
 %0A%0A%0A%0A
@@ -4005,8 +4005,641 @@
       %5D%0A
+%0A%0A%0A%0A#### start Heroku setup ####%0A## https://devcenter.heroku.com/articles/getting-started-with-django%0A# Parse database configuration from $DATABASE_URL%0A%0Aimport dj_database_url%0ADATABASES%5B'default'%5D =  dj_database_url.config()%0A%0A# Honor the 'X-Forwarded-Proto' header for request.is_secure()%0ASECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')%0A%0A# Allow all host headers%0AALLOWED_HOSTS = %5B'*'%5D%0A%0A# Static asset configuration%0Aimport os%0ABASE_DIR = os.path.dirname(os.path.abspath(__file__))%0ASTATIC_ROOT = 'staticfiles'%0ASTATIC_URL = '/static/'%0A%0ASTATICFILES_DIRS = (%0A        os.path.join(BASE_DIR, 'static'),%0A)%0A#### end Heroku setup%0A

move db info to settings.py bottom