Commit 6efaccdb authored by Ian Rafael T. Aragoza's avatar Ian Rafael T. Aragoza

Update dashboard views.py to show widget users

parent 23ff524b
from django.shortcuts import render
from django.http import HttpResponse
from .models import WidgetUser
# Create your views here.
def index(request):
return HttpResponse('Dashboard app.')
output = "Welcome to Widget!<br><br> WIDGET USERS:<br>"
userList = WidgetUser.objects.order_by('last_name')
output += '<br>'.join(['{}, {} {}: {}, {}'.format(user.last_name, user.first_name, user.middle_name, user.department, user.department.home_unit) for user in userList])
return HttpResponse(output)
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