Opened 3 years ago

Last modified 9 months 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: master
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 9 months ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 3 years ago by Tim Graham

Triage Stage: UnreviewedAccepted

comment:2 Changed 10 months ago by Anton Samarchyan

Cc: desecho@… added

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

comment:3 Changed 10 months ago by Tim Graham

A start at solving this for {% include %} is attached to the ticket.

Last edited 9 months ago by Tim Graham (previous) (diff)

Changed 9 months ago by Tim Graham

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