Fixed occured errors

parent e79e2e5d
......@@ -3,9 +3,9 @@ from .views import dashboard_view, WidgetUserView, WidgetUserCreateView, WidgetU
urlpatterns = [
path('',dashboard_view, name = 'dashboard'),
path('dashboard/widget/<pk>/details/', WidgetUserView.as_view(), name='widgetuser-details'),
path('dashboard/widget/<pk>/add/', WidgetUserCreateView.as_view(), name='widgetuser-add'),
path('dashboard/widget/<pk>/edit/', WidgetUserUpdateView.as_view(), name='widgetuser-edit'),
path('/widgetusers/<pk>/details', WidgetUserView.as_view(), name='widgetuser-details'),
path('/widgetusers/add', WidgetUserCreateView.as_view(), name='widgetuser-add'),
path('/widgetusers/<pk>/edit', WidgetUserUpdateView.as_view(), name='widgetuser-edit'),
]
app_name = "dashboard"
\ No newline at end of file
from django.shortcuts import render
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, UpdateView
from django.http import HttpResponse
from .models import WidgetUser, Department
def dashboard_view(request):
return render(request, 'dashboard/dashboard.html',{'nickname': 'Dani'})
context = {}
context["widgetuser_list"] = WidgetUser.objects.all()
return render(request, 'dashboard/dashboard.html',context)
class WidgetUserView(DetailView):
......
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