Commit b327a07a authored by Daniel W Bond's avatar Daniel W Bond
Browse files

aspirational settings changes; regrouped sections, standardized spacing

parent abc8d18b
...@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/1.7/ref/settings/ ...@@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/1.7/ref/settings/
from __future__ import absolute_import, print_function from __future__ import absolute_import, print_function
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) BASE_DIR = os.path.dirname(os.path.dirname(__file__))
...@@ -26,8 +27,6 @@ STATICFILES_DIRS = ( ...@@ -26,8 +27,6 @@ STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR, 'static'),
) )
print(TEMPLATE_DIRS)
TEMPLATE_LOADERS = ( TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader', 'django.template.loaders.filesystem.Loader',
...@@ -79,6 +78,7 @@ INSTALLED_APPS = ( ...@@ -79,6 +78,7 @@ INSTALLED_APPS = (
'randomslugfield', 'randomslugfield',
'haystack', 'haystack',
'multiselectfield', 'multiselectfield',
# social media authentication
'allauth', 'allauth',
'allauth.account', 'allauth.account',
'allauth.socialaccount', 'allauth.socialaccount',
...@@ -86,6 +86,10 @@ INSTALLED_APPS = ( ...@@ -86,6 +86,10 @@ INSTALLED_APPS = (
'allauth.socialaccount.providers.google', 'allauth.socialaccount.providers.google',
'allauth.socialaccount.providers.twitter', 'allauth.socialaccount.providers.twitter',
'allauth.socialaccount.providers.instagram', 'allauth.socialaccount.providers.instagram',
# 'allauth.socialaccount.providers.tumblr',
# 'allauth.socialaccount.providers.spotify',
# 'allauth.socialaccount.providers.github',
# twitch? stackexchange? soundcloud?
) )
CRISPY_TEMPLATE_PACK = 'bootstrap' CRISPY_TEMPLATE_PACK = 'bootstrap'
...@@ -107,11 +111,12 @@ ROOT_URLCONF = 'settings.urls' ...@@ -107,11 +111,12 @@ ROOT_URLCONF = 'settings.urls'
WSGI_APPLICATION = 'settings.wsgi.application' WSGI_APPLICATION = 'settings.wsgi.application'
from . import secret from . import secret
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
SECRET_KEY = secret.SECRET_KEY SECRET_KEY = secret.SECRET_KEY
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': config.DB_ENGINE, 'ENGINE': config.DB_ENGINE,
...@@ -138,15 +143,30 @@ USE_TZ = True ...@@ -138,15 +143,30 @@ USE_TZ = True
# set for social auth # set for social auth
# example.com is by default set to 1 # example.com is by default set to 1
SITE_ID = 2 SITE_ID = 2
# further settings for social auth
SOCIALACCOUNT_ADAPTER = 'accounts.adapter.AccountAdapter'
SOCIALACCOUNT_PROVIDERS = {
'facebook': {
'SCOPE': ['public_profile', ],
'FIELDS': [
'id',
'first_name',
'last_name',
'link',
]
}
}
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/ # https://docs.djangoproject.com/en/1.7/howto/static-files/
STATIC_URL = '/static/' STATIC_URL = '/static/'
ACCOUNT_ADAPTER = 'accounts.adapter.AccountAdapter'
AUTHENTICATION_BACKENDS = ( AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend', 'django.contrib.auth.backends.ModelBackend',
'cas.backends.CASBackend', 'cas.backends.CASBackend',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment