Features: 1) Add support for custom JSON field in CONSTANCE_ADDITIONAL_FIELDS.
Fixes: 1) Correct placement of "constance" in `INSTALLED_APPS`. Extra: 1) Minor comment formatting adjustment in `CONSTANCE_BACKEND` declaration.
This commit is contained in:
parent
1cad1aead8
commit
c950ce04b9
2 changed files with 8 additions and 2 deletions
|
|
@ -95,6 +95,7 @@ SITE_ID = 1
|
|||
|
||||
INSTALLED_APPS = [
|
||||
"django_prometheus",
|
||||
"constance",
|
||||
"django_daisy",
|
||||
"modeltranslation",
|
||||
"django.contrib.admin",
|
||||
|
|
@ -123,7 +124,6 @@ INSTALLED_APPS = [
|
|||
"django_extensions",
|
||||
"django_redis",
|
||||
"widget_tweaks",
|
||||
"constance",
|
||||
"mptt",
|
||||
"rest_framework",
|
||||
"rest_framework_simplejwt",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,13 @@ from django.utils.translation import gettext_lazy as _
|
|||
|
||||
from evibes.settings.base import getenv
|
||||
|
||||
CONSTANCE_BACKEND = "constance.backends.database.DatabaseBackend" # Or 'constance.backends.redis.RedisBackend'
|
||||
CONSTANCE_BACKEND = "constance.backends.database.DatabaseBackend" # Or "constance.backends.redis.RedisBackend"
|
||||
|
||||
CONSTANCE_ADDITIONAL_FIELDS = {
|
||||
"json": ["django.forms.fields.JSONField", {
|
||||
"widget": "core.widgets.JSONTableWidget",
|
||||
}],
|
||||
}
|
||||
|
||||
CONSTANCE_CONFIG = {
|
||||
"PROJECT_NAME": (getenv("EVIBES_PROJECT_NAME"), _("Name of the project")),
|
||||
|
|
|
|||
Loading…
Reference in a new issue