aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/models.py
diff options
context:
space:
mode:
authorMitch Riedstra <Mitch@riedstra.us>2017-10-11 15:04:54 -0400
committerMitch Riedstra <Mitch@riedstra.us>2017-10-11 15:04:54 -0400
commit7e4586e4f9d1a00be0a546b490ebfd09d0b8b307 (patch)
tree18e1138ad2c1971e2fdda4e273dd383ca57258b6 /app/dispatch/models.py
parent083b6cb954eceffd5eee99a0e4eb78091138d481 (diff)
downloaddispatch-tracker-7e4586e4f9d1a00be0a546b490ebfd09d0b8b307.tar.gz
dispatch-tracker-7e4586e4f9d1a00be0a546b490ebfd09d0b8b307.tar.xz
Misc developments and messing with file uploads
Diffstat (limited to 'app/dispatch/models.py')
-rw-r--r--app/dispatch/models.py14
1 files changed, 7 insertions, 7 deletions
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