As for django to generate dynamic query string in the template?

There is some page with a list of articles based on the ListView
I added a few blocks of hyperlinks, sort, and display articles such as:
Unit 1

Unit 2
Per day|Per week|Per month

Unit 3 (the number of articles per page)

The output settings I give in the query string:

I tried to do it through
def dinamic(value, str_filtre, str_value):

forming in the template something like:
<a href="{% url 'article:list' %}{% dinamic request.get_full_path "sort" "list" %}">full</a>|

but it's not a goldfish... settings zadavayte clicking twice on one unit, for example (by date)
tell me method of forming such links. Throw an example.. I would be grateful
June 3rd 19 at 19:16
2 answers
June 3rd 19 at 19:18
Hmm dinamic-e will replace tried? Yuzaete
June 3rd 19 at 19:20
Forming URLs for the current page can be something like this.

def dinamic(context, **kwargs):
 request = context['request']
 qparams = request.GET.dict()
 return '{}?{}'.format(request.path_info,

{% dinamic param1='value1' %}
It's not very clear.. But the template parameters param1 and value1 that is passed? - winfield.Von commented on June 3rd 19 at 19:23
For example, {% dinamic date='week' %} - Maxine_Turner commented on June 3rd 19 at 19:26

Find more questions by tags Django