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