mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Fixed the prefix handling.
This commit is contained in:
parent
e9d937be5a
commit
a8b158ad1c
2 changed files with 3 additions and 2 deletions
|
|
@ -23,6 +23,7 @@ class DatabaseBackend(Backend):
|
|||
def __init__(self):
|
||||
from constance.backends.database.models import Constance
|
||||
self._model = Constance
|
||||
self._prefix = settings.DATABASE_PREFIX
|
||||
if not self._model._meta.installed:
|
||||
raise ImproperlyConfigured(
|
||||
"The constance.backends.database app isn't installed "
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ settings = import_module_attr(
|
|||
os.getenv('CONSTANCE_SETTINGS_MODULE', 'django.conf.settings')
|
||||
)
|
||||
|
||||
PREFIX = getattr(settings, 'CONSTANCE_REDIS_PREFIX',
|
||||
getattr(settings, 'CONSTANCE_PREFIX', 'constance:'))
|
||||
REDIS_PREFIX = getattr(settings, 'CONSTANCE_REDIS_PREFIX',
|
||||
getattr(settings, 'CONSTANCE_PREFIX', 'constance:'))
|
||||
|
||||
BACKEND = getattr(settings, 'CONSTANCE_BACKEND', 'constance.backends.redisd.RedisBackend')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue