Skip to main content

Django template loader that allows you to load and override a template from a specific Django application.

Project description

Build status Code health Python versions Software license

django-apptemplates is a Django template loader that allows you to load a template from a specific application. By this you can both extend and override a template at the same time. The default Django loaders require you to copy the entire template you want to override, even if you only want to override one small block.

Based on:

Version Support

django-apptemplates is tested against the officially supported combinations of Python and Django, since Django 1.4 (Django 1.4 to 3.0 on Python 2.7, and 3.4 to 3.8).

Installation, Setup and Use

This package is available from PyPI. To install it simply execute:

$ pip install django-apptemplates

Settings (for Django 1.8+)

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'OPTIONS': {
            'loaders': [

Settings (for Django < 1.8)


How to Use in Templates

Template usage example (extend and override Django admin base template):

{% extends "admin:admin/base.html" %}

The part before the colon (:) is called the Django app namespace.


Authors and Maintainers

Change Log


  • Drop support for Django 1.7 (ImportError)

  • Drop support for Python 2.6, 3.2, 3.3 (not available on Travis CI)


  • Fix Origin missing loader and template_name attrs – Thanks Brendan Roy, @bmon, and Matthew Somerville, @dracos!

  • Also test against Django 2.0


  • Add template loader to returned Origins – Thanks J.J., @jdotjdot!

  • Also test against Python 3.6 – Thanks Justin Walgran, @jwalgran!


  • Reestablish support for Django 1.4 through 1.8 (broken since version 1.1)

  • Add tests for template rendering

  • Drop support for Django 1.3 (which cannot be confirmed by tests)

  • Drop support for Python 2.4 and 2.5 (which cannot be tested anymore)


  • Fix ImportError for Django 1.8 (broken in release 1.1)

  • Add integration tests (test import of package across supported versions)

  • Add clean and test commands to


  • Use django.template.Origin in computation of template location for Django 1.9 compatibility. – Thanks, Gilles Crettenand!


  • Remove Django 1.9 deprecation warning of imports

  • Update README with instructions for Django 1.8+


Skipped to fix conflicting versioning in and the PyPI package


  • Released as originally published on djangosnippets

Download files

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

Source Distribution

django-apptemplates-1.5.tar.gz (5.1 kB view hashes)

Uploaded source

Built Distribution

django_apptemplates-1.5-py2-none-any.whl (8.4 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page