Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Pass only the current path to the template, not the whole request

Roland Geider2e6a2165536b
diff --git a/manager/context_processor.py b/manager/context_processor.py
index f0b56c4e0..523b77978 100644
--- a/manager/context_processor.py
+++ b/manager/context_processor.py
@@ -33,8 +33,8 @@ def processor(request):
# User language
'language': load_language(),
- # The current request
- 'request': request
+ # The current path
+ 'request_full_path': request.get_full_path()
}
# Pseudo-intelligent navigation here
diff --git a/manager/templates/template.html b/manager/templates/template.html
index 53848a278..8e4ad21b1 100644
--- a/manager/templates/template.html
+++ b/manager/templates/template.html
@@ -159,7 +159,7 @@
</section>
<div class="ym-wbox" id="content-wrapper">
<section class="ym-grid linearize-level-1">
- <div id="current-url" data-current-url="{{request.get_full_path}}"></div>
+ <div id="current-url" data-current-url="{{request_full_path}}"></div>
{% if user.get_profile.is_temporary %}
<div class="box info" style="padding:0.6em; margin: 0em 0em 1em 0em;">
{% trans "You are using a temporary account, this user will be deleted after some time."%}