Refactor docker-compose.yml build context and add question review URL and view; create question_review.html template
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{% extends 'sbas/base.html' %}
|
||||
|
||||
{% load partials %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
Test
|
||||
|
||||
{% endblock %}
|
||||
@@ -286,6 +286,11 @@ def generic_view_urls(generic_views: GenericViewBase):
|
||||
generic_views.question_reviews_list,
|
||||
name="question_reviews",
|
||||
),
|
||||
path(
|
||||
"question/review/",
|
||||
generic_views.question_review_start,
|
||||
name="question_review_start",
|
||||
),
|
||||
path("question/<int:pk>/thumbnail/fail", generic_views.question_thumbnail_fail, name="series_thumbnail_fail"),
|
||||
path("question/<int:pk>/thumbnail", generic_views.question_thumbnail, name="series_thumbnail"),
|
||||
path(
|
||||
|
||||
+8
-1
@@ -3007,7 +3007,7 @@ class GenericViewBase:
|
||||
|
||||
# Default: render the block (latest if exists, otherwise form)
|
||||
if latest:
|
||||
return render(request, "generic/partials/question_review_block.html", {"review": latest, "question": question, "app_name": self.app_name})
|
||||
return render(request, "/generic/partials/question_review_block.html", {"review": latest, "question": question, "app_name": self.app_name})
|
||||
else:
|
||||
# Ensure a form is available for the template
|
||||
if latest:
|
||||
@@ -3031,6 +3031,13 @@ class GenericViewBase:
|
||||
|
||||
return render(request, "generic/partials/question_reviews_list.html", {"question": question, "reviews": reviews, "app_name": self.app_name})
|
||||
|
||||
def question_review_start(self, request):
|
||||
|
||||
|
||||
return render(request, "generic/question_review_start.html", {"app_name": self.app_name})
|
||||
|
||||
|
||||
|
||||
@method_decorator(user_passes_test(lambda u: u.is_superuser))
|
||||
def user_answer_delete_multiple(self, request):
|
||||
print(request.POST["answer_ids"])
|
||||
|
||||
Reference in New Issue
Block a user