Skip to main content

A simple Django extension for url manipulation

Project description

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 “djangofurl” to your INSTALLED_APPS:

    INSTALLED_APPS = [
        ...
        'django_furl',
    ]
  2. Load “djangofurl” 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-furl-0.0.1.tar.gz (1.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page