Made the Dashboard URLs lowercase to match the project specs

parent c4b8d144
......@@ -3,12 +3,12 @@ from .views import (Dashboard_list_view, WidgetUserDetailView,
WidgetUserAddView, WidgetUserUpdateView)
urlpatterns = [
path('Dashboard/', Dashboard_list_view, name='Dashboard_list_view'),
path('Widgetusers/<int:pk>/details', WidgetUserDetailView.as_view(),
path('dashboard/', Dashboard_list_view, name='Dashboard_list_view'),
path('widgetusers', WidgetUserDetailView.as_view(),
name='widgetuser-detail'),
path('Widgetusers/add/', WidgetUserAddView.as_view(),
path('widgetusers', WidgetUserAddView.as_view(),
name='widgetuser-add'),
path('Widgetusers/<int:pk>/edit/', WidgetUserUpdateView.as_view(),
path('widgetusers/<int:pk>/edit/', WidgetUserUpdateView.as_view(),
name='widgetuser-edit')
]
......
......@@ -32,7 +32,7 @@ def Dashboard_list_view(request):
class WidgetUserDetailView(generic.DetailView):
model = WidgetUser
template_name = 'widgetuser-details.html'
template_name = 'dashboard/widgetuser-details.html'
queryset = WidgetUser.objects.all()
context_object_name = 'widgetuser-detail'
......@@ -40,7 +40,7 @@ class WidgetUserDetailView(generic.DetailView):
class WidgetUserAddView(generic.CreateView):
model = WidgetUser
fields = '__all__'
template_name = 'widgetuser-add.html'
template_name = 'dashboard/widgetuser-add.html'
def get_success_url(self):
return reverse('Dashboard:widgetuser-detail', kwargs={'pk': self.object.id},
......@@ -49,9 +49,9 @@ class WidgetUserAddView(generic.CreateView):
class WidgetUserUpdateView(generic.UpdateView):
model = WidgetUser
template_name = 'widgetuser-edit.html'
template_name = 'dashboard/widgetuser-edit.html'
fields = '__all__'
success_url = "Dashboard/"
success_url = "dashboard/"
def get_success_url(self):
return reverse('Dashboard:widgetuser-detail', kwargs={'pk': self.object.id},
......
......@@ -34,7 +34,7 @@ def index(request):
html_string += '''
</ul>
<a href="widget_Calendar/Events/add"><button value="click here">New Activity</button></a><br><br>
<a href="/Dashboard/">Dashboard</a><br>
<a href="/dashboard/">dashboard</a><br>
<a href="/announcements/">Announcements</a><br>
<a href="/forum/">Forum</a><br>
<a href="/assignments">Assignments</a><br>
......
......@@ -20,9 +20,9 @@ from django.urls import include, path
urlpatterns = [
path('', include('announcements.urls', namespace="announcements")),
path('widget_Calendar/', include('widget_Calendar.urls', namespace="widget_Calendar")),
path('', include('Dashboard.urls', namespace="Dashboard")),
path('', include('Dashboard.urls', namespace="dashboard")),
path('admin/', admin.site.urls),
path('assignments/', include('assignments.urls', namespace="assignments")),
path('', include(('forum.urls', 'forum'), namespace='forum')),
# path('Dashboard/', include('Dashboard.urls', namespace="Dashboard")),
# path('dashboard/', include('dashboard.urls', namespace="dashboard")),
]
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