Commits

Branko Vukelic committed 98dcc11

Added add_params template tag

  • Participants
  • Parent commits 75a017a

Comments (0)

Files changed (1)

File url_tools/templatetags/urls.py

 register = template.Library()
 
 
+@register.simple_tag
+def add_params(url, **kwargs):
+    url = UrlHelper(url)
+    url.update_query_data(**kwargs)
+    return url.get_full_path()
+
+
 @register.assignment_tag
 def url_params(url, **kwargs):
     u = UrlHelper(url)