Add department to admin view of WidgetUser model in homepage

parent bb06ec8c
...@@ -9,8 +9,8 @@ class DepartmentAdmin(admin.ModelAdmin): ...@@ -9,8 +9,8 @@ class DepartmentAdmin(admin.ModelAdmin):
class WidgetUserAdmin(admin.ModelAdmin): class WidgetUserAdmin(admin.ModelAdmin):
model = WidgetUser model = WidgetUser
search_fields = ['first_name', 'middle_name', 'last_name', 'id_num', 'email'] search_fields = ['first_name', 'middle_name', 'last_name', 'id_num', 'email', 'department']
list_display = ('first_name', 'middle_name', 'last_name', 'id_num', 'email') list_display = ('first_name', 'middle_name', 'last_name', 'id_num', 'email', 'department')
admin.site.register(Department, DepartmentAdmin) admin.site.register(Department, DepartmentAdmin)
admin.site.register(WidgetUser, WidgetUserAdmin) admin.site.register(WidgetUser, WidgetUserAdmin)
\ 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