The keys are string prefixes; they can be any string, actually,
but since we’re going for short a single character is probably good.

Values are the (hopefully-familiar) "<app-name>.<model-class>" used
by Django to identify a model. Remember: app-name is the
(case-sensitive) last bit of your app’s name in INSTALLED_APPS, and
<model-class> is your model class’s name, lowercased.

Make sure your models have a get_absolute_url() method defined.

Wire up the redirect view by adding to your URLconf:

('^short/', include('shorturls.urls'))

If you’d like to quickly link to shortened URLs in your templates, stick
"shorturls" in INSTALLED_APPS, and then in your templates do:

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

(where object is a model instance).

Alternatively:

{% load shorturls %}
{% recanonical object %}

This generates the whole <link rev="canonical"href="..."> tag for
you.

That’s it.

If you’d like more control, keep reading.

Settings

Available settings are:

SHORTEN_MODELS

You’ve seen this one.

SHORT_BASE_URL

If defined, the shorturl and revcanonical template tags will
prefix generated URLs with this value. Use this if you’ve got a shorter
domain name you’d like to use for small URLs.