Hi all,

I've have a few models that need a bit more complex validation than the 
Validators can handle. (They have a start and end date and need to check 
in the database that no other record has an overlapping start / end 
date.) The validation I need to do would be easy to do if the validators 
accepted the primary key of the model they were validating for, if they 
were validating for an existing instance. But as far as I can see, they 
don't.

I thought about changing the behaviour of the admin app slightly so that 
you could raise a ValidationError in (pre-)save, have it caught by the 
admin app and the error returned to the user. I have a patch and tests 
almost complete for this behaviour.

How do you guys feel about that modification? Or is there another 
solution I've overlooked?

Cheers,

Mike

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to