django-href 0.2.2

Django package for shortening URLs
This is a Django app for using the http://href.be/ short URL service, it has a real simple API, for more information see http://href.be/api

Usage

First install the django_href project in one of you library dirs, you can install it globally using the setup.py script, just run python setup.py install.

Now you have to tell your settings.py to load the appropriate libraries:

INSTALLED_APPS = (
 ...
 # required by django_href
 'django.contrib.contenttypes',
 'django_href',
)


After doing this, install the database schemes using manage.py with python manage.py syncdb.

Template tags and filters

You can load the template tags using {% load href %} in the top of your template(s).

Filtering a single link

You can filter the link for a single object using the shorten template filter:

Please visit < a href="{{ obj|shorten }}" >{{ obj.get_absolute_url }}< /a >.

You can also choose to automatically shorten all links in the block with the autoshorten block tag:

{% autoshorten %}
Please visit the < a href="http://pypi.python.org/" >Cheese Shop< /a >.
{% endautoshorten %}


This will result in:

Please visit the < a href="http://href.be/j" >Cheese Shop< /a >.

Bugs / issues


Please post your bugs, issues and remarks on the Git Hub issue tracker at http://github.com/tehmaze/django-href/issues

last updated on:
July 24th, 2010, 9:06 GMT
price:
FREE!
homepage:
github.com
license type:
MIT/X Consortium License 
developed by:
Wijnand Modderman
category:
ROOT \ Internet \ HTTP (WWW)
django-href
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT