diff options
| author | Mitch Riedstra <Mitch@riedstra.us> | 2017-10-11 15:04:54 -0400 |
|---|---|---|
| committer | Mitch Riedstra <Mitch@riedstra.us> | 2017-10-11 15:04:54 -0400 |
| commit | 7e4586e4f9d1a00be0a546b490ebfd09d0b8b307 (patch) | |
| tree | 18e1138ad2c1971e2fdda4e273dd383ca57258b6 /app/dispatch/models.py | |
| parent | 083b6cb954eceffd5eee99a0e4eb78091138d481 (diff) | |
| download | dispatch-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.py | 14 |
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 |
