Browse Source

Add reference field to offer model.

opi 8 years ago
parent
commit
03137955f0
2 changed files with 23 additions and 0 deletions
  1. 20 0
      coin/offers/migrations/0006_offer_reference.py
  2. 3 0
      coin/offers/models.py

+ 20 - 0
coin/offers/migrations/0006_offer_reference.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('offers', '0005_auto_20150210_0923'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='offer',
+            name='reference',
+            field=models.CharField(help_text='Information a utiliser par exemple comme identifiant de virement', max_length=255, null=True, verbose_name="identifiant de l'offre"),
+            preserve_default=True,
+        ),
+    ]

+ 3 - 0
coin/offers/models.py

@@ -19,6 +19,9 @@ class Offer(models.Model):
 
 
     name = models.CharField(max_length=255, blank=False, null=False,
     name = models.CharField(max_length=255, blank=False, null=False,
                             verbose_name="nom de l'offre")
                             verbose_name="nom de l'offre")
+    reference = models.CharField(max_length=255, blank=False, null=True,
+                                    verbose_name="Référence de l'offre",
+                                    help_text="Identifiant a utiliser par exemple comme identifiant de virement")
     configuration_type = models.CharField(max_length=50,
     configuration_type = models.CharField(max_length=50,
                             blank=True,
                             blank=True,
                             verbose_name='type de configuration',
                             verbose_name='type de configuration',