Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to override tags in extended and included templates #138

Open
bcdickinson opened this issue Jan 6, 2021 · 1 comment
Open
Assignees
Labels
django Related to Django templates capabilities enhancement New feature or request
Milestone

Comments

@bcdickinson
Copy link
Collaborator

bcdickinson commented Jan 6, 2021

Is your proposal related to a problem?

Currently, if you have templates like this with an overridden template tag foo...

base.html:

<p>{% foo %}</p>

extended.html:

{% extends "base.html" %}

included.html:

{% include "base.html" %}

... it's not possible to control the output of foo from extended.yaml or included.yaml, only the values set in base.yaml will have any effect.

Describe the solution you'd like

It would be great if the ability to override tags cascaded/inherited the same way as template context.

Describe alternatives you've considered

It's not possible to work around this without duplicating the tag invocation in the inherited template, as far as I know.

@bcdickinson bcdickinson added enhancement New feature or request django Related to Django templates capabilities labels Jan 6, 2021
@bcdickinson bcdickinson added this to the Nice to have milestone Jan 6, 2021
@bcdickinson bcdickinson changed the title Add the ability to override tags in extended templates Add the ability to override tags in extended and included templates Jan 6, 2021
@bcdickinson bcdickinson self-assigned this Jan 6, 2021
@thibaudcolas
Copy link
Member

thibaudcolas commented Jan 24, 2022

Notes from today’s refinement session: still seems well worth solving, still seems very hard. Help wanted on this as it’s unclear how we should proceed.

Dupe (see comments): #8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
django Related to Django templates capabilities enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants