mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 23:00:57 +00:00
use customized constance (#4191)
This commit is contained in:
47
thirdpart/constance/settings.py
Normal file
47
thirdpart/constance/settings.py
Normal file
@@ -0,0 +1,47 @@
|
||||
from django.conf import settings
|
||||
|
||||
BACKEND = getattr(
|
||||
settings,
|
||||
'CONSTANCE_BACKEND',
|
||||
'constance.backends.redisd.RedisBackend'
|
||||
)
|
||||
|
||||
CONFIG = getattr(settings, 'CONSTANCE_CONFIG', {})
|
||||
|
||||
CONFIG_FIELDSETS = getattr(settings, 'CONSTANCE_CONFIG_FIELDSETS', {})
|
||||
|
||||
ADDITIONAL_FIELDS = getattr(settings, 'CONSTANCE_ADDITIONAL_FIELDS', {})
|
||||
|
||||
DATABASE_CACHE_BACKEND = getattr(
|
||||
settings,
|
||||
'CONSTANCE_DATABASE_CACHE_BACKEND',
|
||||
None
|
||||
)
|
||||
|
||||
DATABASE_CACHE_AUTOFILL_TIMEOUT = getattr(
|
||||
settings,
|
||||
'CONSTANCE_DATABASE_CACHE_AUTOFILL_TIMEOUT',
|
||||
60 * 60 * 24
|
||||
)
|
||||
|
||||
DATABASE_PREFIX = getattr(settings, 'CONSTANCE_DATABASE_PREFIX', '')
|
||||
|
||||
REDIS_PREFIX = getattr(settings, 'CONSTANCE_REDIS_PREFIX', 'constance:')
|
||||
|
||||
REDIS_CONNECTION_CLASS = getattr(
|
||||
settings,
|
||||
'CONSTANCE_REDIS_CONNECTION_CLASS',
|
||||
None
|
||||
)
|
||||
|
||||
REDIS_CONNECTION = getattr(settings, 'CONSTANCE_REDIS_CONNECTION', {})
|
||||
|
||||
SUPERUSER_ONLY = getattr(settings, 'CONSTANCE_SUPERUSER_ONLY', True)
|
||||
|
||||
IGNORE_ADMIN_VERSION_CHECK = getattr(
|
||||
settings,
|
||||
'CONSTANCE_IGNORE_ADMIN_VERSION_CHECK',
|
||||
False
|
||||
)
|
||||
|
||||
ENABLED = getattr(settings, 'CONSTANCE_ENABLED', True)
|
Reference in New Issue
Block a user