forked from foundertherapy/django-users-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings_test.py
More file actions
85 lines (72 loc) · 2.24 KB
/
settings_test.py
File metadata and controls
85 lines (72 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
from __future__ import unicode_literals
import os
BASE_DIR = os.path.dirname(__file__)
APPSERVER = os.uname()[1]
SITE_ID = 1
INTERNAL_IPS = ('127.0.0.1', )
ALLOWED_HOSTS = ['localhost', '127.0.0.1', ]
APPEND_SLASH = True
TIME_ZONE = 'UTC'
USE_TZ = True
SECRET_KEY = 'abc'
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.sessions',
'localflavor',
'accountsplus',
'axes',
'captcha',
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'db.sqlite',
}
}
ROOT_URLCONF = 'urls'
LOGIN_URL = 'login'
LOGOUT_URL = 'logout'
LOGIN_REDIRECT_URL = 'index'
MIDDLEWARE = (
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'accountsplus.middleware.TimezoneMiddleware',
)
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
SESSION_COOKIE_AGE = 60 * 30 # 30 minute session length
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, 'test_templates'),
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'accountsplus.context_processors.masquerade_info',
'django.template.context_processors.debug',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.request',
],
'debug': True,
}
},
]
ACCOUNTS_ENABLE_AUDIT_LOG = False
AXES_LOCK_OUT_AT_FAILURE = True
RECAPTCHA_PUBLIC_KEY = 'publicKey'
RECAPTCHA_PRIVATE_KEY = 'privateKey'
AXES_COOLOFF_TIME = 1
AXES_LOGIN_FAILURE_LIMIT = 1
AXES_LOCKOUT_URL = 'locked/'