add allauth configuration and message tags

This commit is contained in:
Jan Dittberner 2015-01-17 17:50:59 +01:00
parent 286c477efc
commit ab313a2a66
3 changed files with 26 additions and 4 deletions

View file

@ -10,6 +10,7 @@ from sys import path
# Normally you should not import ANYTHING from Django directly
# into your settings, but ImproperlyConfigured is an exception.
from django.core.exceptions import ImproperlyConfigured
from django.contrib.messages import constants as messages
def get_env_variable(var_name):
@ -247,7 +248,6 @@ ALLAUTH_APPS = (
'allauth.socialaccount',
'allauth.socialaccount.providers.google',
'allauth.socialaccount.providers.linkedin_oauth2',
'allauth.socialaccount.providers.openid',
'allauth.socialaccount.providers.twitter',
'allauth.socialaccount.providers.xing',
)
@ -266,9 +266,23 @@ LOCAL_APPS = (
# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
INSTALLED_APPS = DJANGO_APPS + ALLAUTH_APPS + LOCAL_APPS
MESSAGE_TAGS = {
messages.DEBUG: '',
messages.ERROR: 'text-danger',
messages.INFO: 'text-info',
messages.SUCCESS: 'text-success',
messages.WARNING: 'text-warning',
}
########## END APP CONFIGURATION
########## ALLAUTH CONFIGURATION
LOGIN_REDIRECT_URL = '/'
SOCIALACCOUNT_QUERY_EMAIL = True
########## END ALLAUTH CONFIGURATION
########## CRISPY FORMS CONFIGURATION
CRISPY_TEMPLATE_PACK = 'bootstrap3'
########## END CRISPY_FORMS CONFIGURATION