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

Allow for a customizable fallback mapper #7

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nanuxbe
Copy link

@nanuxbe nanuxbe commented Oct 19, 2024

Hello,

I'm not sure whether you're accepting pull requests or not. If you're not, feel free to close!

My thinking here is to be able to set a fallback_mapper in the settings that defaults to dj_angles.mappers.django.map_include.

What one would be able to able to accomplish by switching the fallback mapper is to use their favorite component library as fallback instead of {% include %}.

So for example, assuming django bird, with the appropriate mapper:
<dj-partial /> would be mapped to {% bird partial %}{% endbird %} instead of {% include 'partial.html' %}

I'm opening this as draft, as if that's something you'd be interested in, documentation would be needed

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.

1 participant