Opened 10 years ago
Closed 10 years ago
#26402 closed New feature (fixed)
Allow relative paths in {% extends %} and {% include %}
| Reported by: | Vitaly Bogomolov | Owned by: | Vitaly Bogomolov |
|---|---|---|---|
| Component: | Template system | Version: | dev |
| Severity: | Normal | Keywords: | extends, include, template, relative path |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Allow relative paths in argument of 'extends' and 'include' template tags. Relative path must start from "./". Examples:
Extend "base.html", located in the same folder, where your template placed:
{% extends "./base.html" %}
Extend "base.html", located at two levels higher
{% extends "./../../base.html" %}
Extend "base.html", located in the 'dir1' subfolder, relatively current template:
{% extends "./dir1/base.html" %}
Discussion:
https://groups.google.com/d/topic/django-developers/rDAJ0Ig6FoU/discussion
Change History (8)
comment:1 by , 10 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 10 years ago
| Needs documentation: | set |
|---|
comment:3 by , 10 years ago
| Triage Stage: | Unreviewed → Someday/Maybe |
|---|
comment:4 by , 10 years ago
| Needs documentation: | unset |
|---|---|
| Patch needs improvement: | set |
| Triage Stage: | Someday/Maybe → Accepted |
comment:5 by , 10 years ago
| Patch needs improvement: | unset |
|---|---|
| Summary: | relative path in {% extends "./../base.html" %} → Allow relative paths in {% extends %} and {% include %} |
comment:6 by , 10 years ago
| Patch needs improvement: | set |
|---|
A few comments for improvement remain and the branch needs to be rebased. Please uncheck "Patch needs improvement" after updating so the ticket returns to the review queue.
comment:7 by , 10 years ago
| Patch needs improvement: | unset |
|---|
The mailing list hasn't reach a consensus about whether or not to add this feature yet.
PR