Add namespaces to app URL confs

This commit is contained in:
Adam Goldsmith 2022-01-25 00:00:58 -05:00
parent c365c56808
commit 29c0afadcc
3 changed files with 6 additions and 3 deletions

View File

@ -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"),
]

View File

@ -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):

View File

@ -3,6 +3,8 @@ from django.urls import path
from . import views
app_name = "tasks"
urlpatterns = [
path("", views.index, name="index"),
# ex: /CMS00001/