aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/models.py
diff options
context:
space:
mode:
authorMitch Riedstra <Mitch@riedstra.us>2017-10-09 15:18:04 -0400
committerMitch Riedstra <Mitch@riedstra.us>2017-10-09 15:18:04 -0400
commita3e789981e0ff8151dcaf51dd97137bc86e9cf59 (patch)
tree0c55fbbc83d4a3c9c284b9702136da1f7e7b3e8e /app/dispatch/models.py
parent0957977a439d0ca8f33cf6b3c7f2457b0bbf7cd6 (diff)
downloaddispatch-tracker-a3e789981e0ff8151dcaf51dd97137bc86e9cf59.tar.gz
dispatch-tracker-a3e789981e0ff8151dcaf51dd97137bc86e9cf59.tar.xz
It would help if I updated the models.py file in version control wouldn't it?
Diffstat (limited to 'app/dispatch/models.py')
-rw-r--r--app/dispatch/models.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/app/dispatch/models.py b/app/dispatch/models.py
index 4e3a855..440804e 100644
--- a/app/dispatch/models.py
+++ b/app/dispatch/models.py
@@ -9,21 +9,11 @@ class Company(models.Model):
address = models.CharField(max_length=256)
phone_number = models.DecimalField(max_digits=16,decimal_places=0)
email_address = models.CharField(max_length=256)
- primary_contact = models.ForeignKey('Contact', blank=True, null=True)
+ contact_name = models.CharField(max_length=256)
def __str__(self):
return self.name
-class Contact(models.Model):
- first_name = models.CharField(max_length=64)
- last_name = models.CharField(max_length=64)
- phone_number = models.DecimalField(max_digits=16,decimal_places=0)
- email_address = models.CharField(max_length=256)
- works_for = models.ForeignKey(Company)
-
- def __str__(self):
- return "{f} {l} ( {c} )".format(c=self.works_for, f=self.first_name, l=self.last_name)
-
class Load(models.Model):
load_number = models.CharField(max_length=64,default="")
date = models.DateField()
@@ -47,5 +37,4 @@ class Load(models.Model):
auditlog.register(Company)
-auditlog.register(Contact)
-auditlog.register(Load) \ No newline at end of file
+auditlog.register(Load)