From a3e789981e0ff8151dcaf51dd97137bc86e9cf59 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 9 Oct 2017 15:18:04 -0400 Subject: It would help if I updated the models.py file in version control wouldn't it? --- app/dispatch/models.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'app') 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) -- cgit v1.2.3