django-admin-hstore-widget
django-admin-hstore-widget copied to clipboard
Hard fork at `django-hstore-widget`
Hi, it seems that this project is not maintained any more, so i have a new fork at django-hstore-widget
PyPi link : django-hstore-widget
Improvements :
- Uses stencil.js
- Uses flexbox instead of float
- Simplified logic compared to django-admin-hstore-widget
- Uses emoji as fallback.
- No hard dependency on
jQuery/underscore - Reduced bundle size.
- Automated publishing using github actions.
- Dropped support for old browsers.
- Based on web-components
With all that being said, the project couldn't have existed without django-admin-hstore-widget, if you guys are willing, i can add back those improvements to this project.
Thanks a bunch
Hi @baseplate-admin,
nice! I love using web components. I prefer Lit to stencil, as it makes due without React, but for the end user it doesn't matter much.
Here are a couple of suggestions, that maybe help to slim down your code. I just rewrote another package of mine, and it might serve as some inspiration.
- You don't need a custom template
You can set
Widget.typeto change the tag. You can set the attributes via thebuild_attrmethod. - 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.
- You can actually serve ESM via
Form.Media. It's supported in Django.
Here are some examples of my comments above: https://github.com/codingjoe/django-s3file/pull/311/files#diff-6d7b852c8b05df0ed5bad3f2e294d95c5e9800b05426a0648e6d1bc8f86b9486
Thank you for your efforts, best of luck! Joe
Hi, thank you for your input on this issue, sorry i had some university stuffs to take care of (that's why this response is a bit delayed).
I have written a follow up in https://github.com/baseplate-admin/django-hstore-widget/issues/28#issuecomment-2477939035