Opened 9 years ago

Last modified 7 years ago

#24577 new Bug

Restrict extending and including to require templates from the same engine.

Reported by: Preston Timmons Owned by: nobody
Component: Template system Version: dev
Severity: Normal Keywords:
Cc: desecho@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If two Django engines are configured and a template object from the first engine is used as an include or extends in a template from the second engine, it's not clear which engine will be used if the template object also happens to include or extend other templates.

Per discussion with Aymeric, it sounds like the least ambiguous behavior it to raise an exception if an included or extended template has a different engine than that of the current template.

This affects the IncludeNode, ExtendsNode, and InclusionNode.

Attachments (1)

24577.diff (3.9 KB ) - added by Tim Graham 7 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Tim Graham, 9 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Anton Samarchyan, 7 years ago

Cc: desecho@… added

I can't reproduce this issue. Can you offer a sample project?

comment:3 by Tim Graham, 7 years ago

A start at solving this for {% Include %} is available as the second commit of the PR for #27722.

Version 0, edited 7 years ago by Tim Graham (next)

by Tim Graham, 7 years ago

Attachment: 24577.diff added
Note: See TracTickets for help on using tickets.
Back to Top