Add namespaces to app URL confs
This commit is contained in:
parent
c365c56808
commit
29c0afadcc
@ -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"),
|
||||
]
|
||||
|
@ -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):
|
||||
|
@ -3,6 +3,8 @@ from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "tasks"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
# ex: /CMS00001/
|
||||
|
Loading…
Reference in New Issue
Block a user