Commit 27adcf95 authored by Brendan Fausto's avatar Brendan Fausto

Modified models to be able to print with formatting

parent 4c94f299
...@@ -13,3 +13,14 @@ class WidgetUser(models.Model): ...@@ -13,3 +13,14 @@ class WidgetUser(models.Model):
last_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255)
department = models.ForeignKey('Department', on_delete=models.PROTECT) department = models.ForeignKey('Department', on_delete=models.PROTECT)
@property
def dept_name(self):
return self.department.dept_name
@property
def home_unit(self):
return self.department.home_unit
def __str__(self):
return '{}, {} {}: {}, {}'.format(self.last_name, self.first_name, self.middle_name, self.dept_name
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment