', image_object)
-class RapidTable(tables.Table):
- edit = tables.LinkColumn('rapids:rapid_update',
+class LongTable(tables.Table):
+ edit = tables.LinkColumn('longs:long_update',
text='Edit',
args=[A('pk')],
orderable=False)
- view = tables.LinkColumn('rapids:rapid_detail',
+ view = tables.LinkColumn('longs:long_detail',
text='View',
args=[A('pk')],
orderable=False)
- clone = tables.LinkColumn('rapids:rapid_clone',
+ clone = tables.LinkColumn('longs:long_clone',
text='Clone',
args=[A('pk')],
orderable=False)
images = ImageColumn("images", orderable=False)
class Meta:
- model = Rapid
+ model = Long
template_name = "django_tables2/bootstrap4.html"
fields = ("normal", "abnormality", "region", "examination",
"laterality", "site", "created_date", "author")
diff --git a/longs/templates/rapids/author_list.html b/longs/templates/rapids/author_list.html
index 82564136..a2ad3c2b 100755
--- a/longs/templates/rapids/author_list.html
+++ b/longs/templates/rapids/author_list.html
@@ -1,8 +1,8 @@
-{% extends 'rapids/base.html' %}
+{% extends 'longs/base.html' %}
{% block content %}
{% for author in authors %}
-Author: {{author.username}},
+Author: {{author.username}},
{% endfor %}
{% endblock %}
\ No newline at end of file
diff --git a/longs/templates/rapids/base.html b/longs/templates/rapids/base.html
index 9b974595..01846ab6 100755
--- a/longs/templates/rapids/base.html
+++ b/longs/templates/rapids/base.html
@@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% block title %}
-Rapids
+Longs
{% endblock %}
{% block css %}
@@ -15,13 +15,13 @@ Rapids
{% block content %}
{% endblock %}
{% block navigation %}
-Rapids:
+Longs:
{% if request.user.is_authenticated %}
-Exams /
-Questions /
-Create Question
+Exams /
+Questions /
+Create Question
{% endif %}
{% comment %}
Questions by:
-author {% endcomment %}
+author {% endcomment %}
{% endblock %}
\ No newline at end of file
diff --git a/longs/templates/rapids/category_detail.html b/longs/templates/rapids/category_detail.html
index 0d8e840e..214690f9 100755
--- a/longs/templates/rapids/category_detail.html
+++ b/longs/templates/rapids/category_detail.html
@@ -1,11 +1,11 @@
-{% extends 'rapids/base.html' %}
+{% extends 'longs/base.html' %}
{% block content %}
{{category}}:
diff --git a/longs/templates/rapids/exam.html b/longs/templates/rapids/exam.html
index 5636dc22..bda7eb4a 100644
--- a/longs/templates/rapids/exam.html
+++ b/longs/templates/rapids/exam.html
@@ -1,4 +1,4 @@
-{% extends 'rapids/base.html' %}
+{% extends 'longs/base.html' %}
{% block content %}
' % (instance.pk, instance))
-# return render(request, "rapids/create_simple.html", {'form': form})
+# return render(request, "longs/create_simple.html", {'form': form})
@login_required
@@ -429,7 +429,7 @@ def create_abnormality(request):
% (instance.pk, instance)
)
return render(
- request, "rapids/create_simple.html", {"form": form, "name": "Abnormality"}
+ request, "longs/create_simple.html", {"form": form, "name": "Abnormality"}
)
@@ -455,7 +455,7 @@ def create_examination(request):
% (instance.pk, instance)
)
return render(
- request, "rapids/create_simple.html", {"form": form, "name": "Examination"}
+ request, "longs/create_simple.html", {"form": form, "name": "Examination"}
)
@@ -481,7 +481,7 @@ def create_region(request):
% (instance.pk, instance)
)
return render(
- request, "rapids/create_simple.html", {"form": form, "name": "Region"}
+ request, "longs/create_simple.html", {"form": form, "name": "Region"}
)
@@ -497,12 +497,12 @@ def get_region_id(request):
return HttpResponse("/")
-class RapidView(SingleTableMixin, FilterView):
- model = Rapid
- table_class = RapidTable
- template_name = "rapids/view.html"
+class LongView(SingleTableMixin, FilterView):
+ model = Long
+ table_class = LongTable
+ template_name = "longs/view.html"
- filterset_class = RapidFilter
+ filterset_class = LongFilter
def loadJsonAnswer(answer):
@@ -617,7 +617,7 @@ def mark_overview(request, pk):
questions = exam.exam_questions.all()
return render(
- request, "rapids/mark_overview.html", {"exam": exam, "questions": questions}
+ request, "longs/mark_overview.html", {"exam": exam, "questions": questions}
)
@@ -659,14 +659,14 @@ def mark(request, pk, sk):
if request.method == "POST":
- form = MarkRapidQuestionForm(request.POST)
+ form = MarkLongQuestionForm(request.POST)
# *******************************
# TODO: convert to JSON request
# *******************************
if form.is_valid():
# If skip button is pressed skip the question without marking
if "skip" in request.POST:
- return redirect("rapids:mark", pk=pk, sk=n + 1)
+ return redirect("longs:mark", pk=pk, sk=n + 1)
cd = form.cleaned_data
# correct = cd.get("correct")
@@ -738,14 +738,14 @@ def mark(request, pk, sk):
# answer.published_date = timezone.now()
# answer.save()
if "next" in request.POST:
- return redirect("rapids:mark", pk=pk, sk=n + 1)
+ return redirect("longs:mark", pk=pk, sk=n + 1)
elif "previous" in request.POST:
- return redirect("rapids:mark", pk=pk, sk=n - 1)
+ return redirect("longs:mark", pk=pk, sk=n - 1)
# Reset user answers (relies on the functional javascript)
unmarked_user_answers = set()
else:
- form = MarkRapidQuestionForm()
+ form = MarkLongQuestionForm()
correct_answers = question.answers.filter(status=Answer.MarkOptions.CORRECT)
half_mark_answers = question.answers.filter(status=Answer.MarkOptions.HALF_MARK)
@@ -753,7 +753,7 @@ def mark(request, pk, sk):
return render(
request,
- "rapids/mark.html",
+ "longs/mark.html",
{
"exam": exam,
"form": form,
@@ -808,7 +808,7 @@ def active_exams(request, json=True):
{
"name": exam.get_exam_name(),
"url": request.build_absolute_uri(exam.get_json_url()),
- "type": "rapid",
+ "type": "long",
}
)
@@ -825,7 +825,7 @@ def exam_json(request, pk):
if not exam.active:
raise Http404("No available exam")
- exam_json_cache = cache.get("rapids_exam_json_{}".format(pk))
+ exam_json_cache = cache.get("longs_exam_json_{}".format(pk))
if exam_json_cache is not None and not exam.recreate_json:
exam_json_cache["cached"] = True
@@ -840,7 +840,7 @@ def exam_json(request, pk):
for q in questions:
exam_order.append(q.id)
- # Loop through rapidimage associations
+ # Loop through longimage associations
images = []
feedback_images = []
for i in q.images.all():
@@ -857,7 +857,7 @@ def exam_json(request, pk):
"images": images,
#"feedback_image": [],
#"annotations": [str(q.image_annotations)],
- "type": "rapid",
+ "type": "long",
}
#if feedback_images:
@@ -865,9 +865,9 @@ def exam_json(request, pk):
exam_json = {
- "eid": "rapid/{}".format(exam.id),
+ "eid": "long/{}".format(exam.id),
"cached": False,
- "exam_type": "rapid",
+ "exam_type": "long",
"exam_name": exam.name,
"exam_mode": True,
"exam_order": exam_order,
@@ -880,7 +880,7 @@ def exam_json(request, pk):
exam.recreate_json = False
exam.save()
- cache.set("rapids_exam_json_{}".format(pk), exam_json, 3600)
+ cache.set("longs_exam_json_{}".format(pk), exam_json, 3600)
return JsonResponse(exam_json)
@@ -892,7 +892,7 @@ def exam_json_recreate(request, pk):
exam.recreate_json = True
exam.save()
- return redirect("rapids:exam_overview", pk=pk)
+ return redirect("longs:exam_overview", pk=pk)
@login_required
@@ -980,7 +980,7 @@ def exam_scores_cid(request, pk):
return render(
request,
- "rapids/exam_scores.html",
+ "longs/exam_scores.html",
{
"cids": cids,
"exam": exam,
@@ -1053,7 +1053,7 @@ def exam_scores_cid_user(request, pk, sk):
return render(
request,
- "rapids/exam_scores_user.html",
+ "longs/exam_scores_user.html",
{
"exam": exam,
"cid": cid,
@@ -1088,7 +1088,7 @@ def exam_question_detail(request, pk, sk):
return render(
request,
- "rapids/rapid_detail.html",
+ "longs/long_detail.html",
{
"question": question,
"exam": exam,
@@ -1103,7 +1103,7 @@ def exam_question_detail(request, pk, sk):
@login_required
def exam_list(request):
exams = Exam.objects.all()
- return render(request, "rapids/exam_list.html", {"exams": exams})
+ return render(request, "longs/exam_list.html", {"exams": exams})
@login_required
@@ -1121,6 +1121,6 @@ def exam_overview(request, pk):
return render(
request,
- "rapids/exam_overview.html",
+ "longs/exam_overview.html",
{"exam": exam, "questions": questions, "question_number": question_number},
)
\ No newline at end of file