diff --git a/rentals/urls.py b/rentals/urls.py index 0670b22..9ea46a0 100644 --- a/rentals/urls.py +++ b/rentals/urls.py @@ -1,8 +1,9 @@ -from django.shortcuts import redirect from django.urls import path from . import views +app_name = "rentals" + urlpatterns = [ path("", views.lockerIndex, name="index"), ] diff --git a/tasks/models.py b/tasks/models.py index e4e8bfd..278bbb6 100644 --- a/tasks/models.py +++ b/tasks/models.py @@ -17,7 +17,7 @@ class Tool(models.Model): return f"{self.name}{(' - ' + self.asset_tag) if self.asset_tag else ''}" def get_absolute_url(self): - return reverse("toolDetail", args=[self.slug]) + return reverse("tasks:toolDetail", args=[self.slug]) class Task(models.Model): @@ -35,7 +35,7 @@ class Task(models.Model): return f"{self.tool.name}: {self.name}" def get_absolute_url(self): - return reverse("taskDetail", args=[self.tool.slug, self.slug]) + return reverse("tasks:taskDetail", args=[self.tool.slug, self.slug]) @property def last_event(self): diff --git a/tasks/urls.py b/tasks/urls.py index 96054dc..cb5f199 100644 --- a/tasks/urls.py +++ b/tasks/urls.py @@ -3,6 +3,8 @@ from django.urls import path from . import views +app_name = "tasks" + urlpatterns = [ path("", views.index, name="index"), # ex: /CMS00001/