Commit e1f578c2 authored by Gabriel G. Garrero's avatar Gabriel G. Garrero

Created views page for the dashboard app.

parent b1cde49b
from django.shortcuts import render from django.shortcuts import render
from django.http import HttpResponse
# Create your views here. from .models import Department, WidgetUser
def index(request):
users = WidgetUser.objects.all()
WelcomeMessage = "Welcome to Widget!<br><br>WIDGET USERS:<br>"
for user in users:
WelcomeMessage = WelcomeMessage + user.last_name + ", " + user.first_name + " " + user.middle_name + ": " + user.department.dept_name + ", " + user.department.home_unit + "<br>"
return HttpResponse(WelcomeMessage)
\ 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