This commit is contained in:
Ross
2022-04-02 22:38:55 +01:00
parent 44af9b9915
commit 76020a3fa3
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -628,7 +628,7 @@ class CaseCollection(models.Model):
)
def get_absolute_url(self):
return reverse("atlas:collection_detail_view", kwargs={"pk": self.pk})
return reverse("atlas:collection_detail", kwargs={"pk": self.pk})
def __str__(self) -> str:
return self.name
+1 -1
View File
@@ -319,7 +319,7 @@ class CaseCollectionTable(tables.Table):
"atlas:collection_update", text="Edit", args=[A("pk")], orderable=False
)
view = tables.LinkColumn(
"atlas:collection_view", text="View", args=[A("pk")], orderable=False
"atlas:collection_detail", text="View", args=[A("pk")], orderable=False
)
#clone = tables.LinkColumn(
# "atlas:case_clone", text="Clone", args=[A("pk")], orderable=False
+1 -1
View File
@@ -17,7 +17,7 @@ urlpatterns = [
path("collection/create", views.CaseCollectionCreate.as_view(), name="collection_create"),
path("collection/<int:pk>/delete", views.CaseCollectionDelete.as_view(), name="collection_delete"),
path("collection/<int:pk>/update", views.CaseCollectionUpdate.as_view(), name="collection_update"),
path("collection/<int:pk>", views.collection_detail_view, name="collection_detail_view"),
path("collection/<int:pk>", views.collection_detail, name="collection_detail"),
path("collection/<int:pk>/take/<int:cid>/<str:passcode>", views.collection_take_overview, name="collection_take_overview"),
path("collection/<int:pk>/<int:case_number>", views.collection_case_view, name="collection_case_view"),
path("collection/<int:pk>/<int:case_number>/take/<int:cid>/<str:passcode>", views.collection_case_view_take, name="collection_case_view_take"),
+2 -2
View File
@@ -1057,11 +1057,11 @@ class CollectionView(LoginRequiredMixin, SingleTableMixin, FilterView):
filterset_class = CaseCollectionFilter
def collection_detail_view(request, pk):
def collection_detail(request, pk):
collection = get_object_or_404(CaseCollection, pk=pk)
return render(
request, "atlas/collection_detail_view.html", {"collection": collection}
request, "atlas/collection_detail.html", {"collection": collection}
)
def collection_take_overview(request, pk, cid, passcode):