diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-01-21 16:37:09 +0000 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-01-21 16:37:09 +0000 |
commit | 1aade17fe69e52973fd43c4090dbdfaf50009c89 (patch) | |
tree | 3efa176ff0ebd7d94b203a29b9a4e1bc401665ac /ctrack/organisations/models.py | |
parent | 0bfe3454fde753425d37246b73b3eda1b9a756b9 (diff) |
passing test - added address type model
Diffstat (limited to '')
-rw-r--r-- | ctrack/organisations/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py index 3ef794c..cf8e7de 100644 --- a/ctrack/organisations/models.py +++ b/ctrack/organisations/models.py @@ -5,7 +5,12 @@ from django.urls import reverse from slugify import slugify +class AddressType(models.Model): + descriptor = models.CharField(max_length=50) + + class Address(models.Model): + type = models.ForeignKey(AddressType, on_delete=models.CASCADE, default=1) line1 = models.CharField(max_length=255) line2 = models.CharField(max_length=255) line3 = models.CharField(max_length=255) |