On Jul 4, 2006, at 11:34 AM, Jorge Gajon wrote:
> The odd thing is that the FormWrapper, when rendering the select
> field, will pre-select the country according to the value in
> new_data['country_id'] instead of new_data['country']. But when the
> form is POSTed to the view, the selected value
Hi Todd,
> > and for a ForeignKey:
> > related_object = OtherObject.objects.get(pk=23)
> > new_data['related_object'] = str(related_object.id)
>
> This, not so much. The related object entry is in the data field of
> the FormWrapper when I look at it, but if I render the SelectField it
>
Jorge,
I can't thank you enough for explaining this, but I'm still a little
stuck.
On Jul 3, 2006, at 6:46 PM, Jorge Gajon wrote:
> # No post, fill up default values
> new_data['some_field'] = 'default value'
>
> form = form.FormWrapper(manipulator, new_data, errors)
>
Hi,
The choice between doing a custom manipulator from scratch or using
the automatically generated one depends on many factors. In an
application that I am writing I used a custom manipulator because I
needed to create several different objects (from different models) in
one single step. So
I sense I may be trying to do something that's not possible.
I have a model, call it Foo, and I need a page to create a Foo.
Unfortunately, the AddManipulator I get from Foo doesn't exactly
work. As mentioned in a previous post, I need to limit one
MultipleSelectField to only certain items.
5 matches
Mail list logo