Commit b525594f authored by justin's avatar justin

feat: fixed routing so that UserDetails go from /dashboard/widgetusers/... to /widgetusers/

parent 63572b8e
...@@ -27,6 +27,6 @@ class WidgetUser(models.Model): ...@@ -27,6 +27,6 @@ class WidgetUser(models.Model):
def get_absolute_url(self): def get_absolute_url(self):
return reverse( return reverse(
"dashboard:user-detail", "widgetusers:user-detail",
kwargs={"pk": self.pk}, kwargs={"pk": self.pk},
) )
...@@ -5,12 +5,12 @@ from . import views ...@@ -5,12 +5,12 @@ from . import views
urlpatterns = [ urlpatterns = [
path("", views.dashboard, name="dashboard"), path("", views.dashboard, name="dashboard"),
path( path(
"widgetusers/<int:pk>/details", "<int:pk>/details",
views.WidgetUserDetailView.as_view(), views.WidgetUserDetailView.as_view(),
name="user-detail", name="user-detail",
), ),
path( path(
"widgetusers/add", "add",
views.WidgetUserDetailView.as_view(), views.WidgetUserDetailView.as_view(),
name="user-add", name="user-add",
), ),
......
...@@ -19,6 +19,7 @@ from django.urls import path, include ...@@ -19,6 +19,7 @@ from django.urls import path, include
urlpatterns = [ urlpatterns = [
path("admin/", admin.site.urls), path("admin/", admin.site.urls),
path("dashboard/", include("dashboard.urls", namespace="dashboard")), path("dashboard/", include("dashboard.urls", namespace="dashboard")),
path("widgetusers/", include("dashboard.urls", namespace="widgetusers")),
path("calendar/", include("calendar_app.urls", namespace="calendar_app")), path("calendar/", include("calendar_app.urls", namespace="calendar_app")),
path("forum/", include("forum.urls", namespace="forum")), path("forum/", include("forum.urls", namespace="forum")),
path("assignments/", include("assignments.urls", namespace="assignments")), path("assignments/", include("assignments.urls", namespace="assignments")),
......
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