Sorry, I should have said that I'd already tried a custom validator. 
Unfortunately, validators don't provide the functionality I need.

I need to check in the database to see if there are any pages, other 
than the one I am saving, that have start and end dates that overlap 
with the one I am saving. To do that, I need to know the id of the 
object I am saving, or if I am trying to save a new object. Validators 
do not tell me that as the id is not passed in inside all_data.

Is there anywhere else I can add this validation? Or is there a type of 
exception I can raise that the admin area will display as an error and 
let the user correct the data?

Cheers,

Mike

Collin Grady wrote:
> You need to write a validator and use validator_list in the field
> attributes to do custom validation in admin.
>
> http://www.djangoproject.com/documentation/model-api/#validator-list
>
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
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