mirror of
https://github.com/ae-utbm/sith.git
synced 2026-03-28 14:29:43 +00:00
Use urlencode for querystring macro
This commit is contained in:
@@ -254,14 +254,5 @@
|
||||
|
||||
|
||||
{% macro querystring() %}
|
||||
{%- for key, values in request.GET.lists() -%}
|
||||
{%- if key not in kwargs -%}
|
||||
{%- for value in values -%}
|
||||
{{ key }}={{ value }}&
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- for key, value in kwargs.items() -%}
|
||||
{{ key }}={{ value }}&
|
||||
{%- endfor -%}
|
||||
{{- urlencode(dict(dict(request.GET.lists()) | items | list + kwargs | items | list), doseq=True) -}}
|
||||
{% endmacro %}
|
||||
@@ -190,6 +190,7 @@ TEMPLATES = [
|
||||
"get_sith": "com.views.sith",
|
||||
"get_language": "django.utils.translation.get_language",
|
||||
"timedelta": "datetime.timedelta",
|
||||
"urlencode": "urllib.parse.urlencode",
|
||||
},
|
||||
"bytecode_cache": {
|
||||
"name": "default",
|
||||
|
||||
Reference in New Issue
Block a user