django-superform icon indicating copy to clipboard operation
django-superform copied to clipboard

Better document usage in templates

Open garncarz opened this issue 9 years ago • 3 comments

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.

garncarz avatar Sep 01 '15 01:09 garncarz

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.

gregmuellegger avatar Sep 02 '15 07:09 gregmuellegger

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

garncarz avatar Sep 02 '15 17:09 garncarz

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

gregmuellegger avatar Sep 04 '15 06:09 gregmuellegger