Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better document usage in templates #7

Open
garncarz opened this issue Sep 1, 2015 · 3 comments
Open

Better document usage in templates #7

garncarz opened this issue Sep 1, 2015 · 3 comments

Comments

@garncarz
Copy link

garncarz commented Sep 1, 2015

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
Copy link
Collaborator

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
Copy link
Author

garncarz commented Sep 2, 2015

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

@gregmuellegger
Copy link
Collaborator

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

@gregmuellegger gregmuellegger changed the title Document usage with django-bootstrap3 Better document usage in templates Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants