Project Description

django-absoluteuri

Absolute URI functions and template tags for Django.

Why

There are times when you need to output an absolute URL (for example, inside an
email), but you don’t always have access to the request. These utilities use
the Sites Framework if available in order to create absolute URIs.

Installation

Install django-absoluteuri:

pip install django-absoluteuri

Then add it to your INSTALLED_APPS:

INSTALLED_APPS = (
# ...
'django.contrib.sites',
'absoluteuri',
)

django-absoluteuri requires the Sites Framework to be in
INSTALLED_APPS well and configured as well.

Settings

The protocol of the uris returned by this library defaults to http. You
can specify the protocol with the ABSOLUTEURI_PROTOCOL setting.