To be completed... I'm currently messing around using Rust with Yew and Tailwind, to build django admin widgets.
There are no guarantees I'll ever maintain this beyond this lazy Sunday morning. Use completely at your own risk.
Update: it's a Friday morning now. I'm upping my game a fraction with this... still use completely at your own risk.
A solution where I can build powerful widgets for Django Admin, so that I can build widgets in a way akin to how I'd build a React app (i.e. not building raw HTML, js and css),
where I don't have to spend the next five hundred thousand years trying to configure parcel or rollup or whatever,
and where, when there's possibility of multiple widgets from differnet providers/apps on the page, there is minimal/no risk of conflicts between JS libs.
This Medium tutorial:
https://dev.to/arctic_hen7/how-to-set-up-tailwind-css-with-yew-and-trunk-il9
And by this introduction to Yew:
https://yew.rs/docs/concepts/components/introduction
I'm going to:
<body>
will contain the widget html only. The <head>
will contain assets for the widget only.trunk serve
to build the HTML continuously, which:index.html
out to head.html
and body.html
index.html
.Assuming you're in a fresh new devcontainer (which has a postgres container attached)
cd widget
trunk serve
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
You should then go to the admin page, click add and see the widget