Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A Django app which return a BASE_URL template context for the current request.

Project Description

A simple Django application which add Site base URL (with port if used any) to template context processor with each reqeust. You can get Site URL in your template files using {{ BASE_URL }}

Tested Environment

Ubuntu 14.04
Python 3.4
Python 2.7
Django 1.10

Installation Using PIP

pip install django-baseurl

Using Source Code (Github)

git clone

Switch to django-baseurl directory and run command

python install

Add django_baseurl to INSTALLED_APPS in



Add context processor to TEMPLATES in


        'OPTIONS': {
            'context_processors': [



Use below template variable inside your template file to get Site base url (with port if used any)

{{ BASE_URL }}

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(14.7 kB) Copy SHA256 Hash SHA256
Source None Feb 3, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting