Update dashboard view

parent 23ac4f08
...@@ -6,8 +6,8 @@ from .models import Department, WidgetUser ...@@ -6,8 +6,8 @@ from .models import Department, WidgetUser
def index (request): def index (request):
return_string = '<p>Welcome to Widget!</p> WIDGET USERS:<ul>' return_string = '<p>Welcome to Widget!</p> WIDGET USERS:<ul>'
for department in Department.objects.all(): for user in WidgetUser.objects.all():
for user in WidgetUser.objects.all(): for department in Department.objects.all():
return_string += '<li>{}, {} {}: {}, {}</li>'.format( return_string += '<li>{}, {} {}: {}, {}</li>'.format(
user.last_name, user.first_name, user.middle_name, department.dept_name, department.home_unit user.last_name, user.first_name, user.middle_name, department.dept_name, department.home_unit
) )
......
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