On 2/20/06, coulix <[EMAIL PROTECTED]> wrote:

Hello,
i have a simple goal, displaying a form, populate it, save it to the
database.
At the execption of a new validator to check the weight of the image
sent.

First point  i need to write my own manipulator which is pretty much a
copy of the model, i only want to add a validator to one field (image)
the other default one suite me well how do i achieve this wihtout
repeating myself.

 You can replace your manipulator with the following:
manipulator = recettes.AddManipulator()
manipulator.fields[8].validator_list.append(isValideImageWeight)
# 8 here refers to position of image field in your model, correct it if
# it is not so. u can use print recettes.AddManipulator().fields to see the
# fields in order.
After writting this manipulator, i realise i need a save() function
what is it intended to do ?

Normally every manipulator should implement a save() and it should do whatever you want your form precessing logic is.

--
Amit Upadhyay
Blog: http://www.rootshell.be/~upadhyay
+91-9867-359-701
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to