From 7e4586e4f9d1a00be0a546b490ebfd09d0b8b307 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 11 Oct 2017 15:04:54 -0400 Subject: Misc developments and messing with file uploads --- app/dispatch/models.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/dispatch/models.py') diff --git a/app/dispatch/models.py b/app/dispatch/models.py index dfb5273..acb13cd 100644 --- a/app/dispatch/models.py +++ b/app/dispatch/models.py @@ -25,13 +25,13 @@ class Load(models.Model): def __str__(self): return "{c}, {d} ( {a} )".format(c=self.company, d=self.description, a=self.amount) -# class Paperwork(models.Model): -# company = models.OneToOneField(Company) -# description = models.CharField(max_length=256) -# amount = models.DecimalField(max_digits=10,decimal_places=2) -# -# def __str__(self): -# return "{c}, {d} ( {a} )".format(c=self.company, d=self.description, a=self.amount) +class Paperwork(models.Model): + load = models.OneToOneField(Load) + description = models.CharField(max_length=256) + document = models.FileField(upload_to='paperwork/') + + def __str__(self): + return "%s" % Load -- cgit v1.2.3