Ajout de constance

This commit is contained in:
Etienne GILLE
2026-02-13 16:11:29 +01:00
parent e3eb424290
commit 6db152ac06
2 changed files with 17 additions and 2 deletions

View File

@@ -2,4 +2,5 @@ Django~=6.0.2
daphne~=4.2.1
django-node-assets~=0.9.15
python-docx~=1.2.0
django-richtextfield~=1.6.2
django-richtextfield~=1.6.2
django-constance~=4.3.4

View File

@@ -40,7 +40,8 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'django_node_assets',
'compterendu',
'djrichtextfield'
'djrichtextfield',
'constance'
]
MIDDLEWARE = [
@@ -65,6 +66,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'constance.context_processors.config',
],
},
},
@@ -142,4 +144,16 @@ DJRICHTEXT_CONFIG = {
'toolbar': 'bold italic | link image | removeformat',
'width': 700
}
}
#Constance
CONSTANCE_BACKEND = 'constance.backends.database.DatabaseBackend'
CONSTANCE_FILE_ROOT = 'constance'
CONSTANCE_ADDITIONAL_FIELDS = {
'image_field': ['django.forms.ImageField', {}]
}
CONSTANCE_CONFIG = {
'NOM_ASSO': ('Quazar', 'Nom de l\'association'),
'LOGO_ASSO': ('', 'Logo de l\'association', 'image_field'),
}