Domanda

I am looking into using sprox but I can't seem to find any information about styling the generated form. I am sure its got to be something obvious but i didn't see it in the docs or find anything using a google/google groups search.

Ideally i would use sprox to generate the form but be able to pass in some css for layout. I could just manually create the forms but with the built in validation and select, drop downs pulling in data it seemed worth a look.

In a perfect world I would use sprox and pass it to the template and then let my designer have at it for formatting/styling the resulting widget leaving me to not have to fuss with it.

TIA!

È stato utile?

Soluzione

You should be able to pass the form to the template, render it there while adding any custom css rule inside the template itself. For example using <style> tag inside the template head.

If you really want to add a custom CSS on python side you can try to add CSSLink/CSSSource to css key inside form __base_widget_args__ dictionary

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top