jazzband / django-superform

Add forms and formsets to other forms like they were fields.
http://django-superform.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
109 stars 35 forks source link

Better document usage in templates #7

Open garncarz opened 9 years ago

garncarz commented 9 years ago

It took me quite some time to find out I should use {% bootstrap_form form.forms.my_inner_form %} and {% bootstrap_field form.forms.my_inner_form.my_inner_field %}. Actual documentation talks about form.composite_fields a lot, but that's not usable here. Also {{ form.my_inner_form }} works, but {% bootstrap_form form.my_inner_form %} surprisingly doesn't.

gregmuellegger commented 9 years ago

Hi, thanks for the suggestion. I don't know the django-bootstrap3 library but it probably only accepts Django's BoundField and standard Django forms. However to make superform work, we need to extend those datastructures quite a bit in order to bring the extra functionality into existing forms.

But, yes, I agree that we should better document what kind of data/types the {{ form.my_inner_form }} or {{ form.forms.my_inner_form }} constructs do return. We need to do that in a generic way though and cannot only speak about django-bootstrap3 as this would be to very limitted.

garncarz commented 9 years ago

Nevertheless, thanks for the project, so far it seems to work alright and makes form creation really easier/cleaner.

gregmuellegger commented 9 years ago

Cool. Glad that it helps :) Spread the word if you like it.