On 1/17/06, David S. <[EMAIL PROTECTED]> wrote:
> I have some custom validation I want only on adding a record, not changing it.
> Is there a way to qualify my _manipulator_validate_FOO() method or to find out
> from within it if it is an add or change?  I know I can create a custom
> manipulator to use from my own views, but I would like the admin view to use 
> the
> same logic.

You can check whether manipulator.original_object exists. If it does,
it's a change. If it doesn't it's an add.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to