From 377670a65657c3403c61e8777cdc5d77a3cfa009 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sun, 18 Mar 2018 02:14:45 +0100 Subject: [PATCH] Fix description obligatoire --- .../migrations/0029_auto_20180318_0213.py | 20 +++++++++++++++++++ preferences/models.py | 5 ++++- .../preferences/display_preferences.html | 12 ++++++----- 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 preferences/migrations/0029_auto_20180318_0213.py diff --git a/preferences/migrations/0029_auto_20180318_0213.py b/preferences/migrations/0029_auto_20180318_0213.py new file mode 100644 index 00000000..83d135b4 --- /dev/null +++ b/preferences/migrations/0029_auto_20180318_0213.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-03-18 01:13 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0028_assooption_description'), + ] + + operations = [ + migrations.AlterField( + model_name='assooption', + name='description', + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index efd32f88..3c35e34a 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -561,7 +561,10 @@ class AssoOption(PreferencesModel): null=True, blank=True, ) - description = models.TextField(default="") + description = models.TextField( + null=True, + blank=True, + ) class Meta: permissions = ( diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 67666bac..26fc0308 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -57,10 +57,6 @@ with this program; if not, write to the Free Software Foundation, Inc., Creations de clubs par tous {{ useroptions.all_can_create_club }} - - Auto inscription - {{ useroptions.self_adhesion }} - {% if useroptions.user_solde %} Solde maximum @@ -69,6 +65,10 @@ with this program; if not, write to the Free Software Foundation, Inc., {{ useroptions.min_online_payment }} {% endif %} + + Auto inscription + {{ useroptions.self_adhesion }} +

Préférences machines

@@ -185,7 +185,9 @@ with this program; if not, write to the Free Software Foundation, Inc., {{ assooptions.utilisateur_asso }} Moyen de paiement automatique {{ assooptions.payment }} - Description de l'association + + + Description de l'association {{ assooptions.description }}