Commit aca043a2 authored by KaoruSawade's avatar KaoruSawade

edited views.py: implemented WidgetUserDetailView

parent 52e064b0
from django.shortcuts import render
from django.views.generic.detail import DetailView
from .models import Department, WidgetUser
def pageview(request):
......@@ -6,3 +7,8 @@ def pageview(request):
widgetusers = WidgetUser.objects.all()
return render(request, 'dashboard/dashboard.html', {'departments': departments, 'widgetusers': widgetusers})
class WidgetUserDetailView(DetailView):
def get(self, request, pk):
user = WidgetUser.objects.get(pk=pk)
return render(request, 'dashboard/widgetuser-details.html', {'user': user})
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