Skip to content

poxip/django-furl

Repository files navigation

django-furl [WIP]

Build Status Coverage Version License Downloads

django-furl is a simple Django wrapper of Furl's API. It provides essential template tags for url manipulation.

{% furl_add 'http://somestuff.tv/search/?q=The+Office' character='Michael Scott' year=2005 %}

http://somestuff.tv/search/?q=The+Office&character=Michael+Scott&year=2005

Installation

$ pip install django-furl

Quick Start

  1. Add "django_furl" to your INSTALLED_APPS:

    INSTALLED_APPS = [
        ...
        'django_furl',
    ]
    
  2. Load "furl_tags" in your template:

    {% load furl_tags %}
    

Basic Usage

{% furl_add 'http://somestuff.tv/search/?q=The+Office' character='Michael Scott' year=2005 %}

http://somestuff.tv/search/?q=The+Office&character=Michael+Scott&year=2005

{% furl_update 'http://somestuff.tv/search/?page=3' q='The Big Bang Theory' character='Sheldon Cooper' page=1 %}

http://somestuff.tv/search/?page=1&q=The+Big+Bang+Theory&character=Sheldon+Cooper

{% furl_add 'http://somestuff.tv/search/?facets=Type.Other' facets='Category.Drama' q='True Detective' %}

http://somestuff.tv/search/?facets=Type.Other&facets=Category.Drama&q=True+Detective

{% furl_del 'http://somestuff.tv/search/?facets=Type.Other&facets=Category.Other&q=w' 'facets' 'q' %}

http://somestuff.tv/search/

About

A simple Django extension for url manipulation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages