djangosnippets.org: Latest snippets tagged with 'query-string'https://djangosnippets.org/tags/query-string/2013-01-23T11:39:45.767733-06:00Add querystring parameters to path (template tag)
2013-01-23T11:39:45.767733-06:00spenoirhttps://djangosnippets.org/snippets/2882/<p><code><h3>Page: {{ page.number }} of {{ page.paginator.num_pages }}</h3>
{% if page.has_previous or page.has_next %}
<div>
{% if page.has_previous %}
<a href="{% url_add_query page=page.previous_page_number %}">{% endif %}&laquo;
Previous
{% if page.has_previous %}</a>{% endif %}
|
{% if page.has_next %}
<a href="{% url_add_query page=page.next_page_number %}">{% endif %}
Next &raquo;{% if page.has_next %}</a>{% …</code></p>
Freely redistributableYet another query string template tag
2011-04-12T17:09:46.448055-05:00atmshttps://djangosnippets.org/snippets/2413/<p>This one works works with or without query string dicts
defined in the context. And it handles replacement, addition and
removal of values for parameters with multiple values.</p>
<p>Usage:</p>
<pre><code>{% url view %}{% query_string qs tag+tags month=m %}
</code></pre>
<p>where <code>view</code>, <code>qs</code> (dict), <code>tags</code> (list of strings) and <code>m</code> (number) …</p>
Freely redistributableManipulate URL query strings using context variables using a template tag
2010-10-20T04:58:57.670975-05:00JHsaundershttps://djangosnippets.org/snippets/2237/<p>A template tag that includes a modified version of the GET query string. the query string can be manipulated by adding and removing fields. If a value is given that resolves to a context variable that the value of the variable is used. Based on <a href="http://djangosnippets.org/snippets/826/">this snippet by dnordberg</a>, …</p>
Freely redistributable