thumbnail and overview

This commit is contained in:
Ross
2025-04-14 10:39:08 +01:00
parent edf4a992de
commit eea61fc99c
7 changed files with 52 additions and 10 deletions
+6 -3
View File
@@ -22,18 +22,21 @@
<a href="{% url 'shorts:exam_question_detail' pk=exam.pk sk=forloop.counter0 %}">
{% for image in question.get_images %}
<img src="{{ image|thumbnail_url:'exam-list' }}" alt="thumbail" />
{% empty %}
No image added.
{% endfor %}
</a>
</span>
<span class="flex-col-4">
<span title="Best sample answer">
{% if question.get_best_sample_answer %}
{{ question.get_best_sample_answer }}
{{ question.get_best_sample_answer }} (Score: {{question.get_best_sample_answer.score}})
{% else %}
No sample answer available.
No sample answer available. <a href='{% url "shorts:question_sample_answers" question.pk %}'>Add one now?</a>
{% endif %}
</span>
<br />
Examination: {{ question.get_examinations }},
-6
View File
@@ -117,8 +117,6 @@ def question_split(request, pk):
images = question.images.all()
old_abnormality = question.abnormality.all()
old_region = question.region.all()
old_examination = question.examination.all()
# old_site = rapid.site.all()
old_author = question.author.all()
@@ -131,8 +129,6 @@ def question_split(request, pk):
question.save()
question.abnormality.set(old_abnormality)
question.region.set(old_region)
question.examination.set(old_examination)
# question.site.set(old_site)
question.author.set(old_author)
@@ -197,8 +193,6 @@ class QuestionCreateBase(RevisionMixin, LoginRequiredMixin, CreateView):
# @login_required
class QuestionCreate(QuestionCreateBase):
# initial = {"laterality": Question.NONE}
def get_initial(self):
if "pk" in self.kwargs:
initial = super().get_initial()