From bd5b9f436aa53106d3f6c8e2902dd4d313ff8817 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 5 Dec 2021 15:51:40 +0000 Subject: [PATCH] .u --- atlas/views.py | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/atlas/views.py b/atlas/views.py index 304dcc1c..600acef7 100755 --- a/atlas/views.py +++ b/atlas/views.py @@ -141,8 +141,8 @@ def series_detail(request, pk, finding_pk=None): @login_required @user_is_author_or_atlas_series_checker_or_atlas_marker -def condition_detail(request, pk, finding_pk=None): - condition = get_object_or_404(Series, pk=pk) +def condition_detail(request, pk): + condition = get_object_or_404(Condition, pk=pk) # logging.debug(atlas.subspecialty.first().name.all()) return render( @@ -153,7 +153,33 @@ def condition_detail(request, pk, finding_pk=None): }, ) +@login_required +@user_is_author_or_atlas_series_checker_or_atlas_marker +def structure_detail(request, pk): + structure = get_object_or_404(Structure, pk=pk) + # logging.debug(atlas.subspecialty.first().name.all()) + return render( + request, + "atlas/structure_detail.html", + { + "structure": structure, + }, + ) + +@login_required +@user_is_author_or_atlas_series_checker_or_atlas_marker +def finding_detail(request, pk): + finding = get_object_or_404(Finding, pk=pk) + + # logging.debug(atlas.subspecialty.first().name.all()) + return render( + request, + "atlas/finding_detail.html", + { + "finding": finding, + }, + ) @login_required @user_is_author_or_atlas_checker def author_detail(request, pk):