Re: Try to tweak given manipulators or start from scratch?

2006-07-04 Thread Todd O'Bryan
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

Re: Try to tweak given manipulators or start from scratch?

2006-07-04 Thread Jorge Gajon
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 >

Re: Try to tweak given manipulators or start from scratch?

2006-07-03 Thread Todd O'Bryan
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) >

Re: Try to tweak given manipulators or start from scratch?

2006-07-03 Thread Jorge Gajon
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

Try to tweak given manipulators or start from scratch?

2006-07-03 Thread Todd O'Bryan
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.