Metadata-Version: 1.1
Name: django-qurl-templatetag
Version: 0.0.13
Summary: A Django template tag to modify url's query string.
Home-page: https://github.com/sophilabs/django-qurl-templatetag
Author: Sophilabs
Author-email: hi@sophilabs.com
License: MIT license
Description: ===============================
        Django QUrl Template Tag
        ===============================
        
        
        .. image:: https://img.shields.io/pypi/v/django-qurl-templatetag.svg
                :target: https://pypi.python.org/pypi/django-qurl-templatetag
        
        .. image:: https://img.shields.io/travis/sophilabs/django-qurl-templatetag.svg
                :target: https://travis-ci.org/sophilabs/django-qurl-templatetag
        
        .. image:: https://readthedocs.org/projects/django-qurl-templatetag/badge/?version=latest
                :target: http://django-qurl-templatetag.readthedocs.io/en/latest/?badge=latest
                :alt: Documentation Status
        
        .. image:: https://pyup.io/repos/github/sophilabs/django-qurl-templatetag/shield.svg
             :target: https://pyup.io/repos/github/sophilabs/django-qurl-templatetag/
             :alt: Updates
        
        .. image:: https://img.shields.io/codecov/c/github/sophilabs/django-qurl-templatetag.svg
            :target: https://codecov.io/gh/sophilabs/django-qurl-templatetag
        
        
        A Django template tag to modify url's query string.
        
        
        Documentation
        -------------
        
        The full documentation is at https://django-url-templatetag.readthedocs.org.
        
        
        Quick Start
        -----------
        
        Install Django QUrl Template Tag:
        
        .. code-block::
        
            pip install django-qurl-templatetag
        
        After installation is done, add ``qurl_templatetag`` to the ``INSTALLED_APPS`` setting in your settings.py file:
        
        .. code-block::
        
            INSTALLED_APPS = (
                # …
                'qurl_templatetag',
                # …
            )
        
        Tag Usage
        ---------
        
        .. code-block::
        
            {% load qurl %}
        
            {% qurl url [param]* [as <var_name>] %}
        
            Parameters:
                    name=value: replace all values of name by one value
                    name=None: remove all values of name
                    name+=value: append a new value for name
                    name-=value: remove the value of name with the value
                    name++: increment the value by one
                    name--: decrement the value by one
        
            Example:
        
                {% qurl '/search?page=1&color=blue&color=green' order='name' page=None color+='red' color-='green' %}
                Output: /search?color=blue&order=name&color=red
        
                {% qurl request.get_full_path order='name' %}
        
        
        Library Usage
        -------------
        
        A Qurl object has a set of chainable methods to modify the querystring parameters.
        
        Available methods are:
        
        * set: replace all values of name by one value, parameter is removed when value is None
        * add: append a new value for name
        * remove: remove the value of name with the value
        * inc: increment the value by another value (optional, defaults to 1)
        * dec: decrement the value by another value (optional, defaults to 1)
        * get: build the url
        
        .. code-block::
        
            from qurl_templatetag import Qurl
        
            >>> Qurl('http://www.sophilabs.co/?page=1&tags=python')\
                    .inc('page', value=2)\
                    .add('tags', 'django')\
                    .add('tags', 'web')\
                    .remove('tags', 'python')\
                    .get()
            http://www.sophilabs.co/?page=3&tags=django&tags=web
        
        
        Tests
        -----
        
        .. code-block::
        
            $ pip install -r requirements/test.pip
            $ python runtests.py
        
        About
        -----
        
        .. image:: https://res.cloudinary.com/jsconfuy/image/upload/c_pad,f_auto,h_200,w_200,e_trim/v1426608244/xuwbunompvfjaxuazlwo.png
            :target: https://sophilabs.co
        
        Django Qurl Template Tag is maintained and funded by sophilabs, inc. The names and logos for
        sophilabs are trademarks of sophilabs, inc.
        
        
        =======
        History
        =======
        
        0.0.3 (2016-11-14)
        ------------------
        
        * Third release on PyPI.
        
        
        0.0.2 (2016-09-29)
        ------------------
        
        * Second release on PyPI.
        
        
        0.0.1 (2013-11-14)
        ------------------
        
        * First release on PyPI.
        
Keywords: django,templatetag
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
