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

feature: #235 Allow dynamic component parameter #314

Closed
wants to merge 2 commits into from

Conversation

robwa
Copy link
Contributor

@robwa robwa commented Dec 17, 2021

Up to now, only quoted expressions were allowed as the first parameter of the {% unicorn %} templatetag.

We change it to dynamic parameter handling, any filter expression should be allowed.

Closes #235

@adamghill
Copy link
Owner

This is an awesome contribution (and TIL I learned about FilterExpression)! Can you add a test for this, maybe somewhere in https://github.com/adamghill/django-unicorn/blob/master/tests/templatetags/test_unicorn_render.py?

@adamghill adamghill self-assigned this Dec 17, 2021
@robwa
Copy link
Contributor Author

robwa commented Dec 17, 2021

I will add a test soon.

@robwa
Copy link
Contributor Author

robwa commented Dec 20, 2021

I will add a test soon.

Done with f0133cf

@robwa
Copy link
Contributor Author

robwa commented Dec 22, 2021

Is there anything else I can do for this to be merged?

@adamghill
Copy link
Owner

Hello! I'm planning on making a little edit to raise an explicit exception when the component name can't be resolved from the context. Will hopefully push that merge everything into master, and release a new version to PyPI within the next day. Thanks again for your update!

@adamghill
Copy link
Owner

I explicitly merged this PR with 46a04e6.

@adamghill adamghill closed this Dec 23, 2021
@adamghill
Copy link
Owner

@all-contributors add @robwa for code and tests

@allcontributors
Copy link
Contributor

@adamghill

I've put up a pull request to add @robwa! 🎉

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.

Dynamic page component loading
2 participants