Browse Source

Add ISP's phone_number field.

opi 8 years ago
parent
commit
d02067f889

+ 1 - 1
coin/isp_database/admin.py

@@ -70,7 +70,7 @@ class ISPInfoAdmin(SingleInstanceAdminMixin, admin.ModelAdmin):
             ('latitude', 'longitude'))}),
         ('Contact', {'fields': (
             ('email', 'mainMailingList'),
-            'website')}),
+            'website', 'phone_number')}),
         ('Extras', {
             'fields': ('administrative_email', 'support_email', 'lists_url'),
             'description':

+ 20 - 0
coin/isp_database/migrations/0010_ispinfo_phone_number.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('isp_database', '0009_auto_20151230_1759'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='ispinfo',
+            name='phone_number',
+            field=models.CharField(help_text='Main contact phone number', max_length=25, verbose_name='phone number', blank=True),
+            preserve_default=True,
+        ),
+    ]

+ 3 - 0
coin/isp_database/models.py

@@ -66,6 +66,9 @@ class ISPInfo(SingleInstanceMixin, models.Model):
     mainMailingList = models.EmailField(max_length=254, blank=True,
                                         verbose_name="main mailing list",
                                         help_text="Main public mailing-list")
+    phone_number = models.CharField(max_length=25, blank=True,
+                                    verbose_name="phone number",
+                                    help_text='Main contact phone number')
     creationDate = models.DateField(blank=True, null=True,
                                     verbose_name="creation date",
                                      help_text="Date of creation for legal structure")