django-href

Django package for shortening URLs
Download

django-href Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Wijnand Modderman
  • Publisher web site:
  • http://dev.tehmaze.com/

django-href Tags


django-href Description

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/apiUsageFirst 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 filtersYou can load the template tags using {% load href %} in the top of your template(s).Filtering a single linkYou 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 / issuesPlease post your bugs, issues and remarks on the Git Hub issue tracker at http://github.com/tehmaze/django-href/issues Requirements: · Python · Django


django-href Related Software