Commit a2128669 authored by Almira Redoble's avatar Almira Redoble

Populated models

parent 128cf48c
...@@ -24,6 +24,7 @@ class WidgetUserAdmin(admin.ModelAdmin): ...@@ -24,6 +24,7 @@ class WidgetUserAdmin(admin.ModelAdmin):
class DepartmentAdmin(admin.ModelAdmin): class DepartmentAdmin(admin.ModelAdmin):
model = Department model = Department
list_display = ('dept_name', 'home_unit')
search_fields = ('dept_name', 'home_unit') search_fields = ('dept_name', 'home_unit')
list_filter = ('home_unit', ) list_filter = ('home_unit', )
......
...@@ -6,7 +6,7 @@ class Department(models.Model): ...@@ -6,7 +6,7 @@ class Department(models.Model):
home_unit = models.CharField(max_length=100, default="") home_unit = models.CharField(max_length=100, default="")
def __str__(self): def __str__(self):
return '{},{}'.format(self.dept_name, self.home_unit) return '{}, {}'.format(self.dept_name, self.home_unit)
class WidgetUser(models.Model): class WidgetUser(models.Model):
......
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