This commit is contained in:
Ross
2022-04-02 22:34:14 +01:00
parent 8498b17678
commit 1646bac2cb
5 changed files with 87 additions and 8 deletions
+14 -6
View File
@@ -60,7 +60,9 @@ from .models import (
SeriesImage,
)
from .tables import (
CaseCollectionTable,
CaseTable,
CollectionTable,
ConditionTable,
FindingTable,
PathologicalProcessTable,
@@ -308,7 +310,7 @@ class SeriesDelete(RevisionMixin, AuthorOrCheckerRequiredMixin, DeleteView):
class CaseCollectionDelete(RevisionMixin, AuthorOrCheckerRequiredMixin, DeleteView):
model = CaseCollection
template_name = "confirm_delete.html"
success_url = reverse_lazy("atlas:collection_index_view")
success_url = reverse_lazy("atlas:collection_view")
class ConditionDelete(RevisionMixin, AuthorOrCheckerRequiredMixin, DeleteView):
model = Condition
@@ -1041,12 +1043,18 @@ def categories_list(request):
)
def collection_index_view(request):
collections = CaseCollection.objects.all()
#def collection_view(request):
# collections = CaseCollection.objects.all()
#
# return render(
# request, "atlas/collection_view.html", {"collections": collections}
# )
class CollectionView(LoginRequiredMixin, SingleTableMixin, FilterView):
model = CaseCollection
table_class = CaseCollectionTable
template_name = "atlas/view.html"
return render(
request, "atlas/collection_index_view.html", {"collections": collections}
)
filterset_class = CollectionFilter
def collection_detail_view(request, pk):