Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-revcanonical 0.1

    Download button

    No screenshots available
    Downloads: 292  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Alexander Solovyov | More programs
    BSD License / FREE
    April 14th, 2009, 06:45 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-revcanonical description

    An implementation of rev=canonical url shortening for Django

    django-revcanonical is an implementation of rev=canonical url shortening in the form of Django application. Basically rev=canonical is nice idea about that site should give you two links to actual page: one is human-readable, and another is short version, intented to use in limited conditions.

    This implementation is modelled after Simon Willison's post and returns 301 permanent redirect for your short urls.

    Configuration

    Installation is simple - use it like any another Django application, basically: put it where other application of your project are residing and add 'revcanonical' to INSTALLED_APPS in settings.py. Then edit your urls.py and add inclusion of revcanonical's urls to urlpatterns:

    url(r'', include('revcanonical.urls')),

    Use r'^someprefix/' instead of first argument if you'd like to see prefixed urls.

    By default revcanonical uses internal Django's Site model to determine your site domain, but you can set it manually in settings.py as REVCANONICAL_SITE variable.

    Usage

    Include such code in your template between and tags:

    {% load revcanontags %}
    {% revcanonical object %}


    Of course, you should replace object with your own object variable. And, naturally, it should have get_absolute_url() method.

    Additionally you can set your < a href > links to short urls:

    {% load revcanontags %}
    < a href="{% shorturl object %}" >...< /a >



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    url shortening | Django plugin | Django | URL | shortening

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM