These are chat archives for django/django

Sep 2015
Peter Bittner
Sep 11 2015 23:19
A question on templates and Django 1.8:
  • With Django 1.5 I used django-apptemplates to be able to extend app templates this way: (with 'apptemplates.Loader' in the TEMPLATE_LOADERS)
    {% extends "allauth:account/login.html" %}
    ... where allauth: is the prefix to an installed app (django-allauth in this case).
  • How do I now migrate this syntax to Django 1.8 in a clean fashion? -- Technically, I could do like this:
    {% extends "../../allauth/templates/account/login.html" %}
    But this is hacky, and ugly. There must be a better way.
Peter Bittner
Sep 11 2015 23:41

Hmmm, looks like Fantomas42 explains how this is done with Django 1.8 and (something like) apptemplates:

        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'OPTIONS': {
            'loaders': ('apptemplates.Loader',

But I don't like to specify the loaders instead of setting 'APP_DIRS': True, mostly for safe upgrades. Also, I don't like to ignore the known limitations.
So, is there a better way?