Re: Using form manipulator for data in multiple models
On 2 Aug 2006, at 21:17, Mikeal Rogers wrote: In nearly every POST i get the data needs to be broken up and either modify or create more than one model. I was hoping to still be able to use the model manipulators for this but all the documentation seems to be very single form/post == single model manipulation. I'm wondering if there is some more generic methods in the manipulator or other facilities to break up values over post, etc. -Mikeal PS. A manipulator doc like the model doc would be really handy, outlining all the methods and uses. At the very least docstrings on the methods in the manipulator could help considerably :) I posted at http://trac.studioquattro.biz/djangoutils/wiki/ ManipulatorsMultipleModels my view and template tags witch I'm used to get the same thing. Hope that helps. -- Nebojša Đorđević - nesh Studio Quattro - Niš - Serbia http://studioquattro.biz/ | http://trac.studioquattro.biz/djangoutils/ Registered Linux User 282159 [http://counter.li.org] What is the sound of one backpack EMP weapon discharging? -- Joe Thompson "Clickety-click" -- Charles Cazabon PGP.sig Description: This is a digitally signed message part
Re: Using form manipulator for data in multiple models
Not sure if this is of any help Create a manipulator with the form fields, doesn't matter if they are for two different models just make sure to remember the name. If you want to prepopulate the fields, you might have to fill in the data dictionary before creating the formwrapper and passing the dictionary to the formwrapper. You will have to override the save method in the manipulator and pull the data from the data dictionary and create the separate objects the same as normal. It's probably not the greatest way of doing things, but I'm not sure if there are any generic methods to do similiar Chris --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Using form manipulator for data in multiple models
Hiya, In nearly every POST i get the data needs to be broken up and either modify or create more than one model. I was hoping to still be able to use the model manipulators for this but all the documentation seems to be very single form/post == single model manipulation. I'm wondering if there is some more generic methods in the manipulator or other facilities to break up values over post, etc. -Mikeal PS. A manipulator doc like the model doc would be really handy, outlining all the methods and uses. At the very least docstrings on the methods in the manipulator could help considerably :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---