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

fix: avoid nested django contexts when rendering #415

Merged

Conversation

JuroOravec
Copy link
Collaborator

@JuroOravec JuroOravec commented Mar 30, 2024

Closes #414

The issue was with Context, turns out that the context_data in component.Component.render may already be an instance of Context, so a simple check for that fixed it for me.

I also updated the input for _process_template_and_update_filled_slot_context, so we're not passing in Django's Context, since it wasn't necessary, so there's less touchpoints with it.

@EmilStenstrom
Copy link
Owner

@JuroOravec Excellent, big thanks!

@EmilStenstrom EmilStenstrom merged commit 2c8fc6c into EmilStenstrom:master Mar 30, 2024
8 checks passed
@EmilStenstrom
Copy link
Owner

Released as version 0.63: https://pypi.org/project/django-components/0.63/

@JuroOravec JuroOravec deleted the 414-avoid-nested-context branch March 30, 2024 12: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.

Error with django-compressor: ValueError: dictionary update sequence element #0 has length 5; 2 is required
2 participants