﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27130	Allow using the DjangoTemplates engine without configuring settings	Al Johri	reficul31	"Using Django Templates in standalone mode raises a `AppRegistryNotReady` error.

Root Cause: The `get_templatetag_libraries` method in `django.template.backends.django.DjangoTemplates` calls the `get_installed_libraries` method. The `get_installed_libraries` method calls `apps.get_app_configs` which raises a `AppRegistryNotReady` error if used in standalone mode.

Adding a try except around `get_installed_libraries` is a quick fix that worked for me.

{{{#!python
def get_templatetag_libraries(self, custom_libraries):
    """"""
    Return a collation of template tag libraries from installed
    applications and the supplied custom_libraries argument.
    """"""
    try:
        libraries = get_installed_libraries()
    except AppRegistryNotReady:
        libraries = {}
    libraries.update(custom_libraries)
    return libraries
}}}

Can you advise if this is a reasonable solution? If so, I can submit a PR."	Cleanup/optimization	closed	Template system	dev	Normal	wontfix			Accepted	1	0	1	1	0	0
