I have some models, and some forms to write data to them. The
attributes in models need to have soem validations, (For example, name
must be alpha numeric, price must be less that 1000 etc). SO I write
the validations in model.save() and raise Exceptions, when a
validation fails. I also need to write the same validations in
newforms as I do not want the form post to happen unless the
validation passes. This means that I have the same validation at two
places. (I can't raise ValidationException from models).  Is there a
way to remove this duplication?
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to