Parcourir la source

Merge branch 'feat_105_add_comments_field' of arlo/coin into master

daimrod il y a 8 ans
Parent
commit
4eee8a55e7

+ 2 - 1
coin/offers/admin.py

@@ -42,7 +42,8 @@ class OfferSubscriptionAdmin(admin.ModelAdmin):
                 'offer',
                 'subscription_date',
                 'commitment',
-                'resign_date'
+                'resign_date',
+                'comments'
              )
     form = autocomplete_light.modelform_factory(OfferSubscription, fields='__all__')
 

+ 19 - 0
coin/offers/migrations/0007_offersubscription_comments.py

@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('offers', '0006_offer_reference'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='offersubscription',
+            name='comments',
+            field=models.TextField(help_text="Commentaires libres (informations sp\xe9cifiques concernant l'abonnement)", verbose_name='commentaires', blank=True),
+        ),
+    ]

+ 3 - 0
coin/offers/models.py

@@ -125,6 +125,9 @@ class OfferSubscription(models.Model):
                                      help_text='en mois',
                                      validators=[MinValueValidator(0)],
                                      default=0)
+    comments = models.TextField(blank=True, verbose_name='commentaires',
+                                help_text="Commentaires libres (informations"
+                                " spécifiques concernant l'abonnement)")
     member = models.ForeignKey('members.Member', verbose_name='membre')
     offer = models.ForeignKey('Offer', verbose_name='offre')