On 1/18/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.
>
>
In your _manipulator_validate_FOO(self, field_data, all_data) method
you can do this:
def manipulator_validate_FOO(self, field_data, all_data):
from django.models.myapp import bars # assuming your model name is Bar
if isinstance(self, bars.AddManipulator):
# do something
regards
matthew