2013-09-29 15:59:16 +02:00
|
|
|
"""
|
|
|
|
Django settings for nsupdate project
|
|
|
|
"""
|
|
|
|
|
2013-09-29 01:12:23 +02:00
|
|
|
import os
|
2013-10-03 19:26:39 +02:00
|
|
|
import django.conf.global_settings as DEFAULT_SETTINGS
|
2013-09-28 10:44:29 +02:00
|
|
|
|
2013-10-27 07:20:43 +01:00
|
|
|
# Use a unique, long, random, secret string here.
|
|
|
|
SECRET_KEY = 'this is for sure not secret, but good enough for running the unit tests'
|
|
|
|
|
2013-09-28 10:44:29 +02:00
|
|
|
DEBUG = True
|
|
|
|
TEMPLATE_DEBUG = DEBUG
|
|
|
|
|
|
|
|
ADMINS = (
|
|
|
|
# ('Your Name', 'your_email@example.com'),
|
|
|
|
)
|
|
|
|
|
2013-11-02 02:03:37 +01:00
|
|
|
# sender address for e.g. user activation emails
|
|
|
|
DEFAULT_FROM_EMAIL = "your_email@example.com"
|
|
|
|
|
2013-09-28 10:44:29 +02:00
|
|
|
MANAGERS = ADMINS
|
|
|
|
|
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
2013-09-29 01:21:44 +02:00
|
|
|
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
|
2013-09-28 11:39:57 +02:00
|
|
|
'NAME': 'nsupdate.sqlite', # Or path to database file if using sqlite3.
|
2013-09-28 10:44:29 +02:00
|
|
|
# The following settings are not used with sqlite3:
|
|
|
|
'USER': '',
|
|
|
|
'PASSWORD': '',
|
2013-09-29 01:21:44 +02:00
|
|
|
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
|
|
|
|
'PORT': '' # Set to empty string for default.
|
2013-09-28 10:44:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-11-03 05:24:54 +01:00
|
|
|
WE_HAVE_SSL = True # True if you run a https site also, suggest that site to users if they work on the http site.
|
2013-09-28 15:44:09 +02:00
|
|
|
BASEDOMAIN = 'nsupdate.info'
|
2013-11-03 00:02:02 +01:00
|
|
|
SERVICE_CONTACT = 'info AT nsupdate DOT info' # shown on "about" page
|
2013-09-29 17:57:56 +02:00
|
|
|
WWW_HOST = BASEDOMAIN
|
|
|
|
WWW_IPV4_HOST = 'ipv4.' + BASEDOMAIN
|
|
|
|
WWW_IPV6_HOST = 'ipv6.' + BASEDOMAIN
|
2013-09-28 15:44:09 +02:00
|
|
|
|
2013-11-01 04:03:34 +01:00
|
|
|
# for debugging IP detection on localhost
|
|
|
|
#WWW_IPV4_HOST = 'localhost:8000'
|
|
|
|
#WWW_IPV6_HOST = 'ip6-localhost:8000'
|
|
|
|
|
2013-09-28 20:35:30 +02:00
|
|
|
BAD_AGENTS = set() # useragent blacklist for /nic/update service
|
|
|
|
|
2013-09-28 10:44:29 +02:00
|
|
|
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
|
|
|
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
|
2013-10-05 04:11:32 +02:00
|
|
|
ALLOWED_HOSTS = [WWW_HOST, WWW_IPV4_HOST, WWW_IPV6_HOST]
|
2013-09-28 10:44:29 +02:00
|
|
|
|
|
|
|
# Local time zone for this installation. Choices can be found here:
|
|
|
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
|
|
|
# although not all choices may be available on all operating systems.
|
|
|
|
# In a Windows environment this must be set to your system time zone.
|
2013-09-28 11:39:57 +02:00
|
|
|
TIME_ZONE = 'Europe/Berlin'
|
2013-09-28 10:44:29 +02:00
|
|
|
|
|
|
|
# Language code for this installation. All choices can be found here:
|
|
|
|
# http://www.i18nguy.com/unicode/language-identifiers.html
|
|
|
|
LANGUAGE_CODE = 'en-us'
|
|
|
|
|
|
|
|
SITE_ID = 1
|
|
|
|
|
|
|
|
# If you set this to False, Django will make some optimizations so as not
|
|
|
|
# to load the internationalization machinery.
|
|
|
|
USE_I18N = True
|
|
|
|
|
|
|
|
# If you set this to False, Django will not format dates, numbers and
|
|
|
|
# calendars according to the current locale.
|
|
|
|
USE_L10N = True
|
|
|
|
|
|
|
|
# If you set this to False, Django will not use timezone-aware datetimes.
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
|
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
|
|
|
# Example: "/var/www/example.com/media/"
|
|
|
|
MEDIA_ROOT = ''
|
|
|
|
|
|
|
|
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
|
|
|
# trailing slash.
|
|
|
|
# Examples: "http://example.com/media/", "http://media.example.com/"
|
|
|
|
MEDIA_URL = ''
|
|
|
|
|
|
|
|
# URL prefix for static files.
|
|
|
|
# Example: "http://example.com/static/", "http://static.example.com/"
|
|
|
|
STATIC_URL = '/static/'
|
|
|
|
|
2013-09-29 01:12:23 +02:00
|
|
|
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
2013-09-29 15:25:18 +02:00
|
|
|
# Absolute path to the directory static files should be collected to.
|
|
|
|
# Don't put anything in this directory yourself; store your static files
|
|
|
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
|
|
|
# Example: "/var/www/example.com/static/"
|
2013-09-29 01:12:23 +02:00
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
|
|
|
|
2013-09-28 10:44:29 +02:00
|
|
|
# Additional locations of static files
|
|
|
|
STATICFILES_DIRS = (
|
|
|
|
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
|
|
|
# Always use forward slashes, even on Windows.
|
|
|
|
# Don't forget to use absolute paths, not relative paths.
|
|
|
|
)
|
|
|
|
|
|
|
|
# List of finder classes that know how to find static files in
|
|
|
|
# various locations.
|
|
|
|
STATICFILES_FINDERS = (
|
|
|
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
|
|
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
2013-09-29 01:21:44 +02:00
|
|
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
2013-09-28 10:44:29 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# List of callables that know how to import templates from various sources.
|
|
|
|
TEMPLATE_LOADERS = (
|
|
|
|
'django.template.loaders.filesystem.Loader',
|
|
|
|
'django.template.loaders.app_directories.Loader',
|
2013-09-29 01:21:44 +02:00
|
|
|
# 'django.template.loaders.eggs.Loader',
|
2013-09-28 10:44:29 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
MIDDLEWARE_CLASSES = (
|
|
|
|
'django.middleware.common.CommonMiddleware',
|
|
|
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
|
|
'django.middleware.csrf.CsrfViewMiddleware',
|
|
|
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
|
|
'django.contrib.messages.middleware.MessageMiddleware',
|
|
|
|
# Uncomment the next line for simple clickjacking protection:
|
|
|
|
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
|
|
)
|
|
|
|
|
2013-09-28 16:46:33 +02:00
|
|
|
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
|
|
|
|
'django.core.context_processors.request',
|
2013-09-28 23:31:33 +02:00
|
|
|
'nsupdate.context_processors.add_settings',
|
2013-11-01 04:03:34 +01:00
|
|
|
'nsupdate.context_processors.remove_stale_ips',
|
2013-11-02 05:15:06 +01:00
|
|
|
'social.apps.django_app.context_processors.backends',
|
|
|
|
'social.apps.django_app.context_processors.login_redirect',
|
2013-09-28 16:46:33 +02:00
|
|
|
)
|
|
|
|
|
2013-09-28 10:44:29 +02:00
|
|
|
ROOT_URLCONF = 'nsupdate.urls'
|
|
|
|
|
|
|
|
# Python dotted path to the WSGI application used by Django's runserver.
|
|
|
|
WSGI_APPLICATION = 'nsupdate.wsgi.application'
|
|
|
|
|
|
|
|
TEMPLATE_DIRS = (
|
2013-11-03 22:57:37 +01:00
|
|
|
# you can add site-specific template dirs here to customize nsupdate.info
|
2013-09-28 10:44:29 +02:00
|
|
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
|
|
|
# Always use forward slashes, even on Windows.
|
|
|
|
# Don't forget to use absolute paths, not relative paths.
|
|
|
|
)
|
|
|
|
|
|
|
|
INSTALLED_APPS = (
|
|
|
|
'django.contrib.auth',
|
|
|
|
'django.contrib.contenttypes',
|
|
|
|
'django.contrib.sessions',
|
|
|
|
'django.contrib.sites',
|
|
|
|
'django.contrib.messages',
|
|
|
|
'django.contrib.staticfiles',
|
2013-09-28 11:39:57 +02:00
|
|
|
'django.contrib.admin',
|
2013-11-02 05:15:06 +01:00
|
|
|
'social.apps.django_app.default',
|
2013-09-28 11:39:57 +02:00
|
|
|
'south',
|
|
|
|
'nsupdate',
|
2013-10-17 20:50:44 +00:00
|
|
|
'nsupdate.accounts',
|
|
|
|
'nsupdate.api',
|
|
|
|
'nsupdate.main',
|
2013-09-28 12:43:57 +02:00
|
|
|
'bootstrapform',
|
|
|
|
'registration',
|
2013-10-18 15:30:17 -07:00
|
|
|
'django_extensions',
|
2013-09-28 10:44:29 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# A sample logging configuration. The only tangible logging
|
|
|
|
# performed by this configuration is to send an email to
|
|
|
|
# the site admins on every HTTP 500 error when DEBUG=False.
|
|
|
|
# See http://docs.djangoproject.com/en/dev/topics/logging for
|
|
|
|
# more details on how to customize your logging configuration.
|
|
|
|
LOGGING = {
|
|
|
|
'version': 1,
|
|
|
|
'disable_existing_loggers': False,
|
|
|
|
'filters': {
|
|
|
|
'require_debug_false': {
|
|
|
|
'()': 'django.utils.log.RequireDebugFalse'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'handlers': {
|
|
|
|
'mail_admins': {
|
|
|
|
'level': 'ERROR',
|
|
|
|
'filters': ['require_debug_false'],
|
|
|
|
'class': 'django.utils.log.AdminEmailHandler'
|
2013-09-28 21:41:47 +02:00
|
|
|
},
|
|
|
|
'stderr': {
|
|
|
|
'level': 'DEBUG',
|
|
|
|
'class': 'logging.StreamHandler',
|
|
|
|
'formatter': 'stderr'
|
2013-09-28 10:44:29 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
'loggers': {
|
2013-10-17 20:50:44 +00:00
|
|
|
'nsupdate.api.views': {
|
2013-09-28 21:41:47 +02:00
|
|
|
'handlers': ['stderr', ],
|
|
|
|
'level': 'DEBUG',
|
|
|
|
'propagate': True,
|
|
|
|
},
|
2013-10-18 15:30:17 -07:00
|
|
|
'nsupdate.main.dnstools': {
|
|
|
|
'handlers': ['stderr', ],
|
|
|
|
'level': 'DEBUG',
|
|
|
|
'propagate': True,
|
|
|
|
},
|
2013-11-01 02:14:25 +01:00
|
|
|
# this is the toplevel handler for all request processing:
|
2013-09-28 10:44:29 +02:00
|
|
|
'django.request': {
|
2013-11-01 02:14:25 +01:00
|
|
|
'handlers': ['mail_admins', 'stderr'],
|
2013-09-28 10:44:29 +02:00
|
|
|
'level': 'ERROR',
|
|
|
|
'propagate': True,
|
|
|
|
},
|
2013-09-28 21:41:47 +02:00
|
|
|
},
|
|
|
|
'formatters': {
|
|
|
|
'stderr': {
|
|
|
|
'format': '[%(asctime)s] %(levelname)s %(message)s'
|
|
|
|
},
|
|
|
|
},
|
2013-09-28 10:44:29 +02:00
|
|
|
}
|
2013-09-28 12:43:57 +02:00
|
|
|
|
2013-09-29 01:08:52 +02:00
|
|
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
|
|
|
|
2013-09-28 12:43:57 +02:00
|
|
|
ACCOUNT_ACTIVATION_DAYS = 7
|
2013-09-28 15:06:34 +02:00
|
|
|
|
2013-09-29 01:12:23 +02:00
|
|
|
LOGIN_REDIRECT_URL = '/overview/'
|
2013-09-28 16:46:33 +02:00
|
|
|
|
2013-11-01 01:05:12 +01:00
|
|
|
CSRF_FAILURE_VIEW = 'nsupdate.main.views.CsrfFailureView'
|
|
|
|
|
|
|
|
# Settings for CSRF cookie.
|
|
|
|
CSRF_COOKIE_NAME = 'csrftoken'
|
|
|
|
CSRF_COOKIE_PATH = '/'
|
2013-11-03 10:19:05 +01:00
|
|
|
CSRF_COOKIE_SECURE = False # use True here if you have set WE_HAVE_SSL = True
|
2013-11-01 04:22:53 +01:00
|
|
|
CSRF_COOKIE_HTTPONLY = False
|
2013-11-01 01:36:09 +01:00
|
|
|
|
|
|
|
# Settings for session cookie.
|
|
|
|
SESSION_COOKIE_NAME = 'sessionid'
|
|
|
|
SESSION_COOKIE_PATH = '/'
|
2013-11-03 10:19:05 +01:00
|
|
|
SESSION_COOKIE_SECURE = False # use True here if you have set WE_HAVE_SSL = True
|
2013-11-01 01:36:09 +01:00
|
|
|
SESSION_COOKIE_HTTPONLY = True
|
2013-11-01 04:22:53 +01:00
|
|
|
SESSION_COOKIE_AGE = 14 * 24 * 3600 # 2 weeks, in seconds
|
2013-11-01 01:36:09 +01:00
|
|
|
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
|
2013-11-01 01:05:12 +01:00
|
|
|
|
2013-11-03 09:52:11 +01:00
|
|
|
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
|
2013-11-01 01:05:12 +01:00
|
|
|
|
2013-11-02 05:15:06 +01:00
|
|
|
# python-social-auth settings
|
|
|
|
|
|
|
|
AUTHENTICATION_BACKENDS = (
|
2013-11-02 07:20:20 +01:00
|
|
|
'social.backends.amazon.AmazonOAuth2',
|
|
|
|
'social.backends.bitbucket.BitbucketOAuth',
|
2013-11-02 07:45:26 +01:00
|
|
|
'social.backends.disqus.DisqusOAuth2',
|
2013-11-02 07:20:20 +01:00
|
|
|
'social.backends.dropbox.DropboxOAuth',
|
2013-11-02 05:15:06 +01:00
|
|
|
'social.backends.github.GithubOAuth2',
|
|
|
|
'social.backends.google.GoogleOAuth2',
|
2013-11-02 07:20:20 +01:00
|
|
|
'social.backends.reddit.RedditOAuth2',
|
|
|
|
'social.backends.soundcloud.SoundcloudOAuth2',
|
|
|
|
'social.backends.stackoverflow.StackoverflowOAuth2',
|
2013-11-02 05:15:06 +01:00
|
|
|
'social.backends.twitter.TwitterOAuth',
|
|
|
|
'django.contrib.auth.backends.ModelBackend',
|
|
|
|
)
|
|
|
|
|
2013-11-02 06:14:12 +01:00
|
|
|
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/'
|
2013-11-02 05:15:06 +01:00
|
|
|
# Used to redirect the user once the auth process ended successfully.
|
|
|
|
# The value of ?next=/foo is used if it was present
|
|
|
|
|
2013-11-02 06:14:12 +01:00
|
|
|
#SOCIAL_AUTH_LOGIN_ERROR_URL = '/login-error/'
|
2013-11-02 05:15:06 +01:00
|
|
|
# URL where the user will be redirected in case of an error
|
|
|
|
|
2013-11-02 06:14:12 +01:00
|
|
|
SOCIAL_AUTH_LOGIN_URL = '/accounts/login/'
|
|
|
|
# Is used as a fallback for LOGIN_ERROR_URL (if it is not defined).
|
2013-11-02 05:15:06 +01:00
|
|
|
|
2013-11-02 06:14:12 +01:00
|
|
|
#SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/new-users-redirect-url/'
|
2013-11-02 05:15:06 +01:00
|
|
|
# Used to redirect new registered users, will be used in place of SOCIAL_AUTH_LOGIN_REDIRECT_URL if defined.
|
|
|
|
|
2013-11-02 09:34:59 +01:00
|
|
|
SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL = '/account/profile/'
|
2013-11-02 10:02:51 +01:00
|
|
|
# Like SOCIAL_AUTH_NEW_USER_REDIRECT_URL but for new associated accounts (user is already logged in).
|
|
|
|
# Used in place of SOCIAL_AUTH_LOGIN_REDIRECT_URL.
|
2013-11-02 05:15:06 +01:00
|
|
|
|
2013-11-02 09:34:59 +01:00
|
|
|
SOCIAL_AUTH_DISCONNECT_REDIRECT_URL = '/account/profile'
|
2013-11-02 05:15:06 +01:00
|
|
|
# The user will be redirected to this URL when a social account is disconnected
|
|
|
|
|
2013-11-02 06:14:12 +01:00
|
|
|
SOCIAL_AUTH_INACTIVE_USER_URL = '/'
|
2013-11-02 05:15:06 +01:00
|
|
|
# Inactive users can be redirected to this URL when trying to authenticate.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_USER_MODEL = 'foo.bar.User'
|
|
|
|
# User model must have a username and email field, these are required.
|
|
|
|
# Also an is_authenticated and is_active boolean flags are recommended, these can be methods if necessary (must
|
|
|
|
# return True or False). If the model lacks them a True value is assumed.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_UID_LENGTH = <int>
|
|
|
|
# Used to define the max length of the field uid. A value of 223 should work when using MySQL InnoDB which impose
|
|
|
|
# a 767 bytes limit (assuming UTF-8 encoding).
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_NONCE_SERVER_URL_LENGTH = <int>
|
|
|
|
# Nonce model has a unique constraint over ('server_url', 'timestamp', 'salt'), salt has a max length of 40, so
|
|
|
|
# server_url length must be tweaked using this setting.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_ASSOCIATION_SERVER_URL_LENGTH = <int> or SOCIAL_AUTH_ASSOCIATION_HANDLE_LENGTH = <int>
|
|
|
|
# Association model has a unique constraint over ('server_url', 'handle'), both fields lengths can be tweaked by
|
|
|
|
# these settings.
|
|
|
|
|
|
|
|
SOCIAL_AUTH_DEFAULT_USERNAME = 'user'
|
|
|
|
# Default value to use as username, can be a callable. An UUID will be appended in case of duplicate entries.
|
|
|
|
|
|
|
|
SOCIAL_AUTH_UUID_LENGTH = 16
|
|
|
|
# This controls the length of the UUID appended to usernames.
|
|
|
|
|
|
|
|
SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL = True
|
|
|
|
# If you want to use the full email address as the username, define this setting.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_SLUGIFY_USERNAMES = False
|
|
|
|
# For those that prefer slugged usernames, the get_username pipeline can apply a slug transformation (code borrowed
|
|
|
|
# from Django project) by defining this setting to True. The feature is disabled by default to to not force this
|
|
|
|
# option to all projects.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_CLEAN_USERNAMES = True
|
|
|
|
# By default the regex r'[^\w.@+-_]+' is applied over usernames to clean them from usual undesired characters like
|
|
|
|
# spaces. Set this setting to False to disable this behavior.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_SANITIZE_REDIRECTS = False
|
|
|
|
# The auth process finishes with a redirect, by default it's done to the value of SOCIAL_AUTH_LOGIN_REDIRECT_URL
|
|
|
|
# but can be overridden with next GET argument. If this settings is True, this application will verify the domain of
|
|
|
|
# the final URL and only redirect to it if it's on the same domain.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_REDIRECT_IS_HTTPS = False
|
|
|
|
# On projects behind a reverse proxy that uses HTTPS, the redirect URIs can became with the wrong schema
|
|
|
|
# (http:// instead of https://) when the request lacks some headers, and might cause errors with the auth process,
|
|
|
|
# to force HTTPS in the final URIs set this setting to True
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_URLOPEN_TIMEOUT = 30
|
|
|
|
# Any urllib2.urlopen call will be performed with the default timeout value, to change it without affecting the
|
|
|
|
# global socket timeout define this setting (the value specifies timeout seconds).
|
|
|
|
# urllib2.urlopen uses socket.getdefaulttimeout() value by default, so setting socket.setdefaulttimeout(...) will
|
|
|
|
# affect urlopen when this setting is not defined, otherwise this setting takes precedence. Also this might affect
|
|
|
|
# other places in Django.
|
|
|
|
# timeout argument was introduced in python 2.6 according to urllib2 documentation
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_<BACKEND_NAME>_WHITELISTED_DOMAINS = ['foo.com', 'bar.com']
|
|
|
|
# Supply a list of domain names to be white-listed. Any user with an email address on any of the allowed domains will
|
|
|
|
# login successfully, otherwise AuthForbidden is raised.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_<BACKEND_NAME>_WHITELISTED_EMAILS = ['me@foo.com', 'you@bar.com']
|
|
|
|
# Supply a list of email addresses to be white-listed. Any user with an email address in this list will login
|
|
|
|
# successfully, otherwise AuthForbidden is raised.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_PROTECTED_USER_FIELDS = ['email', ]
|
|
|
|
# The user_details pipeline processor will set certain fields on user objects, such as email. Set this to a list of
|
|
|
|
# fields you only want to set for newly created users and avoid updating on further logins.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_SESSION_EXPIRATION = True
|
|
|
|
# Some providers return the time that the access token will live, the value is stored in UserSocialAuth.extra_data
|
|
|
|
# under the key expires. By default the current user session is set to expire if this value is present, this
|
|
|
|
# behavior can be disabled by setting.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_OPENID_PAPE_MAX_AUTH_AGE = <int value>
|
|
|
|
# Enable OpenID PAPE extension support by defining this setting.
|
|
|
|
|
|
|
|
#SOCIAL_AUTH_FIELDS_STORED_IN_SESSION = ['foo', ]
|
|
|
|
# If you want to store extra parameters from POST or GET in session, like it was made for next parameter, define
|
|
|
|
# this setting with the parameter names.
|
|
|
|
# In this case foo field's value will be stored when user follows this link
|
|
|
|
# <a href="{% url socialauth_begin 'github' %}?foo=bar">...</a>.
|
|
|
|
|
|
|
|
|
2013-09-28 15:06:34 +02:00
|
|
|
try:
|
|
|
|
from .local_settings import *
|
|
|
|
except ImportError:
|
|
|
|
pass
|