From 8691d11a15c8fac71aac1f0c10f7e3527b734e06 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 2 Sep 2022 17:20:03 +0100 Subject: [PATCH] Only render comments in debug --- website/common/templates/common/comments.html | 8 +++++--- website/utils/context_processors.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/website/common/templates/common/comments.html b/website/common/templates/common/comments.html index 35e3b79..e3b270c 100644 --- a/website/common/templates/common/comments.html +++ b/website/common/templates/common/comments.html @@ -1,5 +1,7 @@ -
+
-
+ - +{% if not DEBUG %} + +{% endif %} diff --git a/website/utils/context_processors.py b/website/utils/context_processors.py index 5ca2404..fc7fa77 100644 --- a/website/utils/context_processors.py +++ b/website/utils/context_processors.py @@ -3,4 +3,4 @@ from django.http.request import HttpRequest def global_vars(request: HttpRequest) -> dict: - return {"SEO_INDEX": settings.SEO_INDEX} + return {"SEO_INDEX": settings.SEO_INDEX, "DEBUG": settings.DEBUG}