diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index a9992cd5..cd6def04 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -8,8 +8,10 @@ services: command: ["redis-server", "/usr/local/etc/redis/redis.conf"] web: build: - context: .. - dockerfile: rad/Dockerfile + # Use the rad/ directory as the build context and the Dockerfile inside it. + # This avoids relative path issues with different docker/compose versions and buildx. + context: ./rad + dockerfile: Dockerfile command: python manage.py runserver 0.0.0.0:8000 #command: pip install -r requirements.txt volumes: diff --git a/generic/templates/generic/question_review.html b/generic/templates/generic/question_review.html new file mode 100644 index 00000000..f38f6051 --- /dev/null +++ b/generic/templates/generic/question_review.html @@ -0,0 +1,9 @@ +{% extends 'sbas/base.html' %} + +{% load partials %} + +{% block content %} + +Test + +{% endblock %} \ No newline at end of file diff --git a/generic/urls.py b/generic/urls.py index 29076898..fb73d46a 100755 --- a/generic/urls.py +++ b/generic/urls.py @@ -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//thumbnail/fail", generic_views.question_thumbnail_fail, name="series_thumbnail_fail"), path("question//thumbnail", generic_views.question_thumbnail, name="series_thumbnail"), path( diff --git a/generic/views.py b/generic/views.py index b268f1e8..be69b256 100644 --- a/generic/views.py +++ b/generic/views.py @@ -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"]) diff --git a/rad/settings.py b/rad/settings.py index df9116dd..8e6cb681 100644 --- a/rad/settings.py +++ b/rad/settings.py @@ -108,6 +108,7 @@ if not DEBUG: 'rad.middleware.coep.COEPMiddleware' ) + ROOT_URLCONF = "rad.urls" #default_loaders = [ @@ -332,6 +333,7 @@ CIMAR_PASSWORD = "" CELERY_BROKER_URL = "redis://redis:6379" CELERY_RESULT_BACKEND = "redis://redis:6379" + try: from .settings_local import * except ImportError as e: diff --git a/sbas/templates/sbas/base.html b/sbas/templates/sbas/base.html index b61ac631..e3d9861d 100644 --- a/sbas/templates/sbas/base.html +++ b/sbas/templates/sbas/base.html @@ -23,6 +23,7 @@