aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-02-17 17:20:40 +0000
committerMatthew Lemon <matt@matthewlemon.com>2020-02-17 17:20:40 +0000
commit05d56d5033fd65eb12c18d0497b1a8cddeda0cb1 (patch)
treed80b84e25ee4922e35d9c8a07c747c39e09726e7
parenteb18b86ba248a88b1383f463ab594bda16ce7961 (diff)
added registered company name and number and blank formatted
-rw-r--r--ctrack/organisations/migrations/0016_auto_20200217_1712.py23
-rw-r--r--ctrack/organisations/models.py8
2 files changed, 29 insertions, 2 deletions
diff --git a/ctrack/organisations/migrations/0016_auto_20200217_1712.py b/ctrack/organisations/migrations/0016_auto_20200217_1712.py
new file mode 100644
index 0000000..2676b56
--- /dev/null
+++ b/ctrack/organisations/migrations/0016_auto_20200217_1712.py
@@ -0,0 +1,23 @@
+# Generated by Django 2.2.9 on 2020-02-17 17:12
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organisations', '0015_organisation_designation_type'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='organisation',
+ name='registered_company_name',
+ field=models.CharField(blank=True, max_length=255),
+ ),
+ migrations.AddField(
+ model_name='organisation',
+ name='registered_company_number',
+ field=models.CharField(blank=True, max_length=100),
+ ),
+ ]
diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py
index 0738405..5493f06 100644
--- a/ctrack/organisations/models.py
+++ b/ctrack/organisations/models.py
@@ -61,9 +61,13 @@ class Organisation(models.Model):
]
name = models.CharField(max_length=255)
- slug = AutoSlugField(populate_from=['name'])
- submode = models.ForeignKey(Submode, on_delete=models.CASCADE, blank=True, null=True)
+ slug = AutoSlugField(populate_from=["name"])
+ submode = models.ForeignKey(
+ Submode, on_delete=models.CASCADE, blank=True, null=True
+ )
designation_type = models.IntegerField(choices=DESIGNATION_TYPE, default=1)
+ registered_company_name = models.CharField(max_length=255, blank=True)
+ registered_company_number = models.CharField(max_length=100, blank=True)
def get_absolute_url(self):
return reverse("organisations:detail", kwargs={"slug": self.slug})