The actual result is that the parent template renders fine but the child
template does not get included
The expected result is an error, e.g. a status code 500
--
Ticket URL: <https://code.djangoproject.com/ticket/28927>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> This bug happens under the following conditions:
> 1. Static files storage is ManifestStaticFilesStorage
> 2. Parent template includes child template with {% include 'child.html'
> %} tag
> 3. Child template uses {% load static %} at the top and uses {% static
> 'missingfile.css' %}
> 4. Referenced static file does not exists (or is missing from .json
> manifest)
>
> The actual result is that the parent template renders fine but the child
> template does not get included
>
> The expected result is an error, e.g. a status code 500
New description:
This bug happens under the following conditions:
1. Static files storage is ManifestStaticFilesStorage
2. Debug setting is False
3. Parent template includes child template with {% include 'child.html' %}
tag
4. Child template uses {% load static %} at the top and uses {% static
'missingfile.css' %}
5. Referenced static file does not exists (or is missing from .json
manifest)
The actual result is that the parent template renders fine but the child
template does not get included
The expected result is an error, e.g. a status code 500
--
--
Ticket URL: <https://code.djangoproject.com/ticket/28927#comment:1>
* status: new => closed
* resolution: => duplicate
Comment:
Since 1.11 Django already raises a warning when an exception occurs during
`{% include %}` and plan to elevate it to an exception in 2.1 so I'm going
to close this as duplicate of #27175 which introduced this change.
In the mean time you can either make sure you enable Python warnings and
assert none is raised during your test suite execution or force this
particular instance of `RemovedInDjango21Warning` to be converted to an
exception using `warnings.simplefilter('error', RemovedInDjango21Warning,
message='^Rendering \{% include ')`
--
Ticket URL: <https://code.djangoproject.com/ticket/28927#comment:2>