1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from django import template
6 from django.utils.http import urlencode
8 register = template.Library()
11 @register.simple_tag(takes_context=True)
12 def set_get(context, *omit, **kwargs):
13 request = context['request']
14 query = request.GET.dict()
18 for k, v in kwargs.items():
20 return urlencode(query)