This is a bridge between django-floppyforms and django-sekizai.
This lets you define custom floppyforms widgets and move the css / js parts to the top or the bottom of the page.
Just write a floppyforms widget with a custom template. In that template, use {% addtoblock "js" %}
to inject some data in a sekizai block. In the template that renders your form, make sure you use iterate over your fields and use {% widget field %}
to render instead of {{ field }}
.
Note that to render your widget separately in the console, you'll need to add enable_sekizai
in one of your app's templatetags and do {% load enable_sekizai %}{% enable_sekizai %}
. Note that anything inside the {% addtoblock %} tags will disappear but your widgets can be rendered in the console.
Not sure this plays well with hidden widgets. Use at your own risk.