diff --git a/preferences/migrations/0025_generaloption_general_message.py b/preferences/migrations/0025_generaloption_general_message.py new file mode 100644 index 00000000..073ec44f --- /dev/null +++ b/preferences/migrations/0025_generaloption_general_message.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-16 02:38 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0024_optionaluser_all_can_create'), + ] + + operations = [ + migrations.AddField( + model_name='generaloption', + name='general_message', + field=models.TextField(default='', help_text='Message général affiché sur le site (maintenance, etc'), + ), + ] diff --git a/preferences/migrations/0026_auto_20171216_0401.py b/preferences/migrations/0026_auto_20171216_0401.py new file mode 100644 index 00000000..4adba4cd --- /dev/null +++ b/preferences/migrations/0026_auto_20171216_0401.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-12-16 03:01 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0025_generaloption_general_message'), + ] + + operations = [ + migrations.AlterField( + model_name='generaloption', + name='general_message', + field=models.TextField(blank=True, default='', help_text='Message général affiché sur le site (maintenance, etc'), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index 6a793a24..2e803b66 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -102,6 +102,11 @@ class GeneralOption(models.Model): temps où les liens sont valides""" PRETTY_NAME = "Options générales" + general_message = models.TextField( + default="", + blank=True, + help_text="Message général affiché sur le site (maintenance, etc" + ) search_display_page = models.IntegerField(default=15) pagination_number = models.IntegerField(default=25) pagination_large_number = models.IntegerField(default=8) diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 4858e414..ad807155 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -131,6 +131,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,