El 06/03/15 11:22, john escribió:
I saws that to in the Doc's - it did not work for me with bootstrap.
I did not find the cause - if there wasn't some sort of bug. I'm
using Django 1.7.5 so I'll guess and say it had something to do with
the interaction of the two. I have moved on to crispy-forms and all
seems to work. But like I said at the start - in answer to the
question "Could you provide us more in-deapth of your feeling using
the django form?" I found the information provided from the doc's to
be confusing and did not explain why I had to subclass. More examples
are needed (and all in one doc - not link after link after link).
Maybe what I'm asking for is for the tutorial to better explain the
use and ways to mod the form code to get things done.
I guess you only need to subclass a widget if you want to change
appearance and behavior of all instances.
I'm using Django 1.9 and Bootstrap v3.3.1 and I've just tried the
example using a CharField in a form like this and worked!
class SearchElementForm(forms.Form):
q = forms.CharField(label='Search', max_length=30,
widget=forms.TextInput(attrs={'size': '40'}))
I wasn't using the size attribute at all but when I tried, it was
displayed with a different size every time I changed the size.
Felix
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/54FA0E05.9010406%40epepm.cupet.cu.
For more options, visit https://groups.google.com/d/optout.