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

Incorporate ideas from @codingjoe #28

Open
baseplate-admin opened this issue Oct 30, 2024 · 1 comment
Open

Incorporate ideas from @codingjoe #28

baseplate-admin opened this issue Oct 30, 2024 · 1 comment

Comments

@baseplate-admin
Copy link
Owner

Incorporate ideas from :

@baseplate-admin
Copy link
Owner Author

Thank you so much on your input. @codingjoe.
Now answering some questions from you in PokaInc/django-admin-hstore-widget#27 (comment)

You don't need a custom template
You can set Widget.type to change the tag.
You can set the attributes via the build_attr method.

For me, personally using a custom template seemed easier to use, since i dont have control over the textarea element that django provides, i think its better to use something truly custom.

Also, i found passing params via build_attr a bit cumbersome.

You could consider extending a native HTML input. That make's FormData collection easy, but rendering much harder. So it's hard to say which solution is better.

Stencil doesn't allow me to extend a native html input, but thank you for your suggestion. If i ever move away from stencil, i will reconsider your suggestion.

You can actually serve ESM via Form.Media. It's supported in Django.

Done. Thank you for your suggestion.

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

No branches or pull requests

1 participant