diff --git a/requirements.txt b/requirements.txt index b978e27..c04858d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 \ No newline at end of file +django-richtextfield~=1.6.2 +django-constance~=4.3.4 \ No newline at end of file diff --git a/reunion/settings.py b/reunion/settings.py index 080b74a..5382317 100644 --- a/reunion/settings.py +++ b/reunion/settings.py @@ -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'), } \ No newline at end of file