> Out of interest, where do you find newforms to be inflexible? Are you
> referring to the form_for_* convenience functions or the bulk of
> newforms itself?
I also found some 'inflexible' places.

I had a lot of work with form_for_* methods.
While using form_for_* methods there is only one place you
can customize your fields/widgets: formfield_callback. I think it is
not enough.

In my case there were a lot of ForeignKey fields and I had to filter
their queryset and change value displayed in <select> element.
It was hard to do it. Also I didn't know where should I set that
fields are required (I couldn't set null=True in model).

Because of this I've written my own 'my_form_for_*' methods with
additional callbacks.
For example: callback that is called just before 'formfield' call
(before oldform's field is changed into newform's field).
This callback made changing queryset, required, widget class very
easy, but it was not easy to
write (or rather realize how this works) this stuff.

--
Pigletto


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to