This software is a Django implementation for rev=canonical URL shortening. It provides a simpler way to track website traffic and avoid duplicate content using rev=canonical tags.
This implementation follows Simon Willison's blog post and provides a 301 permanent redirect to your short URLs. You can easily install this application just like any other Django application. Simply put it where the other applications in your project reside and add 'revcanonical' to INSTALLED_APPS in settings.py. Then, edit the urls.py and add the inclusion of revcanonical's URLs to urlpatterns. You can use r'^someprefix/' instead of the first argument if you want to see prefixed URLs.
By default, revcanonical uses Django's internal Site model to determine your site domain. However, you can manually set it in settings.py as REVCANONICAL_SITE variable. To use this application, include the code below in your template between the and tags: {% load revcanontags %} {% revcanonical object %}. Make sure to replace object with your object variable, which should have the get_absolute_url() method.
Furthermore, you can set your < a href > links to short URLs like this: {% load revcanontags %} < a href="{% shorturl object %}" >...< /a >. Try django-revcanonical and make your URLs more readable and convenient to use!
Version 0.1: N/A