Commit c76df248 authored by Teo Quinto's avatar Teo Quinto

Edited the views for homepage to reflect the details accordingly.

parent ac1866a1
from django.http import HttpResponse
from .models import Department, WidgetUser
users = WidgetUser.objects.all()
displayString = "WIDGET USERS:"
for i in users:
userString = '<br />{}, {} {}: {}, {}, {}, {}'.format(i.last_name, i.first_name, i.middle_name, i.id_num, i.email, i.department.dept_name, i.department.home_unit)
displayString += userString
# Create your views here.
def index(request):
return HttpResponse('Welcome to Widget!')
\ No newline at end of file
return HttpResponse(displayString)
\ 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