On 9/22/06, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote: > > Once I used this kind of way and it really works. It's only kind of > tricky to decide, when to call validators for each of the manipulators > and when to save, if there is a relationship between the two models, > for example: > 1. if A and B are not saved, how to validate B, that has to be related > to A, when A still has no primary key to assign to B. > 2. should at first A be validated and saved, and only then B > validated? If B is not valid, should A be deleted? > > As I've never used custom manipulators for this reason, it would be > interesting to know is it easier to use the custom manipulator or this > approach. > > Good luck! > Aidas Bendoraitis [aka Archatas] > Using custom manipulator is not because it's easier, just because many things that AddManipulator or ChangeManipulator couldn't do. Using custom manipulator you should write down which fields you want to process, and the fields are not the ModelField class but FormField class, so there are some differences between them and you should notice carefully. Then you also need to write your own save method to process the request data. So it's not easier, but I think it's more clearly, because you know what you'v done. And for complex situation, for example multi models need to be dealed at same time and they may have relationship also, so it's the only way to process for now I think.
-- I like python! My Blog: http://www.donews.net/limodou UliPad Site: http://wiki.woodpecker.org.cn/moin/UliPad UliPad Maillist: http://groups.google.com/group/ulipad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---