Commit 14b85895 authored by justin's avatar justin

Created string representation per model

parent b41e4a09
...@@ -5,6 +5,9 @@ class Department(models.Model): ...@@ -5,6 +5,9 @@ class Department(models.Model):
dept_name = models.CharField(max_length=255) dept_name = models.CharField(max_length=255)
home_unit = models.CharField(max_length=255) home_unit = models.CharField(max_length=255)
def __str__(self):
return self.dept_name
class WidgetUser(models.Model): class WidgetUser(models.Model):
first_name = models.CharField(max_length=255) first_name = models.CharField(max_length=255)
...@@ -14,3 +17,6 @@ class WidgetUser(models.Model): ...@@ -14,3 +17,6 @@ class WidgetUser(models.Model):
Department, Department,
on_delete=models.CASCADE, on_delete=models.CASCADE,
) )
def __str__(self):
return f"{self.last_name}, {self.first_name} {self.middle_name}"
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