Opened 7 years ago

Last modified 6 years ago

#24125 assigned Bug

TemplateDetailView in admindocs requires a single Django templates engine

Reported by: Aymeric Augustin Owned by: Kai Richard König
Component: contrib.admindocs Version: dev
Severity: Normal Keywords: multiple-template-engines
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


TemplateDetailView.get_context_data() calls Engine.get_default() which raises ImproperlyConfigured if zero or several Django templates engines are configured.

This limitation should either be lifted or documented. Gracefully showing an error message would already be better than failing with an uncaught exception.

Change History (9)

comment:1 Changed 7 years ago by Aymeric Augustin <aymeric.augustin@…>

In 511a53b3142551a1bc3093ed1b6655f57634f510:

Avoided exceptions in admindocs' template detail view.

This is marginally better than crashing when several Django template
engines are configured in a project.

Refs #24125.

comment:2 Changed 7 years ago by Tim Graham

Keywords: 1.8 added
Severity: Release blockerNormal
Triage Stage: UnreviewedAccepted

This view seems pretty obscure and of limited use. I'm going to demote from a release blocker and tag it "1.8" instead so we make sure to document the limitation if no one cares to write a patch by then.

comment:3 Changed 7 years ago by Aymeric Augustin

Yes, since it doesn't crash anymore, it isn't a blocker.

comment:4 Changed 7 years ago by Tim Graham

Keywords: 1.8 removed

I don't think so many people will hit this issue that it's even worth documenting.

comment:5 Changed 7 years ago by Aymeric Augustin


comment:6 Changed 6 years ago by Kai Richard König

Owner: changed from nobody to Kai Richard König
Status: newassigned

comment:7 Changed 6 years ago by Aymeric Augustin

As duplicate ticket #24957 shows, at least one person has noticed.

comment:8 Changed 6 years ago by Tim Graham

It was the person working on this ticket who didn't realize the purpose of it.

comment:9 Changed 6 years ago by Tim Graham <timograham@…>

In 3c593ba7:

Refs #24125 -- Added admin_docs tests for multiple template engines.

This adds a test for 511a53b3142551a1bc3093ed1b6655f57634f510

Note: See TracTickets for help on using tickets.
Back to Top