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

Handles edge case where custom template tag defines child_nodelist at… #46

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

topher235
Copy link

…tr as None

Absolutely love the library. I've recently discovered django-render-block is incompatible with django-slippers.

When a template tag is encountered before finding our desired block and that template tag defines its child_nodelist attributes as None, the rendering blows up here since None is not iterable.

Since standard Django procedure is to create an empty NodeList and extend it when parsing, I'd say the onus of this should be put on the custom template tag definition to not set child nodelists to None. And I have opened a PR in the django-slippers repo as well. That said, I can't think of a side effect of including this here and it does handle the edge case where the attribute is explicitly defined as None.

@topher235 topher235 requested a review from clokep as a code owner July 31, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant