diff --git a/tcms/core/context_processors.py b/tcms/core/context_processors.py index c92a96c4ea..f2b769b502 100644 --- a/tcms/core/context_processors.py +++ b/tcms/core/context_processors.py @@ -5,9 +5,14 @@ def request_contents_processor(request): """ - Django request contents RequestContext Handler + Exposes only values that we need, not everything! """ - return {"REQUEST_CONTENTS": request.GET or request.POST} + data = request.GET or request.POST + return { + "REQUEST__ALLOW_SELECT": data.get("allow_select"), + "REQUEST__NEXT": data.get("next", ""), + "REQUEST__NONAV": data.get("nonav"), + } def settings_processor(_request): diff --git a/tcms/templates/base.html b/tcms/templates/base.html index 6dbdabe9d4..ccaabb5856 100644 --- a/tcms/templates/base.html +++ b/tcms/templates/base.html @@ -32,7 +32,7 @@ {% block head %}{% endblock %} - {% if not REQUEST_CONTENTS.nonav %} + {% if not REQUEST__NONAV %} {% include 'navbar.html' %} {% endif %} diff --git a/tcms/templates/include/ads.html b/tcms/templates/include/ads.html index 4028c22c68..7c4a4d2849 100644 --- a/tcms/templates/include/ads.html +++ b/tcms/templates/include/ads.html @@ -1,4 +1,4 @@ -{% if not REQUEST_CONTENTS.nonav %} +{% if not REQUEST__NONAV %}
{% endif %} diff --git a/tcms/templates/registration/password_reset_form.html b/tcms/templates/registration/password_reset_form.html index f61073a111..4403f9a5aa 100644 --- a/tcms/templates/registration/password_reset_form.html +++ b/tcms/templates/registration/password_reset_form.html @@ -9,7 +9,7 @@
{% csrf_token %} - +
{{ form.email.errors }} diff --git a/tcms/testcases/templates/testcases/search.html b/tcms/testcases/templates/testcases/search.html index 1ae8e7598c..e1756073e5 100644 --- a/tcms/testcases/templates/testcases/search.html +++ b/tcms/testcases/templates/testcases/search.html @@ -165,7 +165,7 @@ - {% if REQUEST_CONTENTS.allow_select %} + {% if REQUEST__ALLOW_SELECT %}