I really like the ability to use modelforms in django to speed up UI. IE:
<html>
...
{{ myform }}
...
</html>
However, the HTML output I need to create does not match what is created by default. I cannot change my required HTML output, but I would like to change the output of the form.
I know that there are a few approaches to doing so. Looping over the fields and displaying each one individually (i.e. looping and displaying {{ myform.field }}
) works ok, but it's not nearly as nice as just doing {{ myform }}
. Widgets seemed like a good idea, but after looking at the docs & some examples, I am not so sure - I just want to change the html output, not the functionality. If there WAS some way to output a field based perhaps on a template, that would be nice.
Any ideas?