-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
67 lines (61 loc) · 1.64 KB
/
settings.py
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
from django.conf import settings
SETTINGS = {
'THRESHOLD': 3,
'PARTIALBYTES': 2,
'SECRET_VERIFICATION_BYTES': 4,
'SECRET_LENGTH': 32,
'CACHE_ALIAS': 'pph'
}
INSTALLED_APPS = (
'django.contrib.auth',
'django_pph',
)
PASSWORD_HASHERS = (
'django_pph.hashers.PolyPasswordHasher',
)
CACHES={
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
},
# this will store non-persistent information (you can use the memcache if
# desired
'pph': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': 'pph_cache',
'TIMEOUT': None,
},
# for persistent storage, only non sensitive information will be stored here
'share_cache': {
'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
'LOCATION': 'share_table',
},
}
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s',
},
'simple': {
'format': '%(levelname)s %(message)s',
},
},
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
# set this path to a location specific to your project
'filename': '/path/to/log.log',
'formatter':'verbose',
},
},
'loggers': {
'django.security.PPH': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
},
}
SETTINGS.update(getattr(settings, 'PPH_SETTINGS', {}))