Opened 3 years ago

Closed 3 years ago

#17362 closed New feature (wontfix)

include with filename unquoted fails silently

Reported by: adrian_nye@… Owned by: nobody
Component: Template system Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


{% include overview_views.html %}

obviously should be:

{% include "overview_views.html" %}

But if the quotes are missing, the file is not included and there is no error message.

It would be better to include the file anyway if possible, and
if that is not possible then display an error message.

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

Marking as wontfix. The template engine failing without an error message is a design choice -- one of the design choices of the Django template language is that it is better to show a partially rendered page than to show a page with an error.

We can't magically interpret around missing quotes, either. Unquoted, the argument means "look for a variable with this name"; quoted, it means "use this literal file name".

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.