You can override the model's save method?[1][2]

Cheers,
AT


[1]
https://docs.djangoproject.com/en/dev/ref/models/instances/#saving-objects
[2]
https://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods


On Mon, Jan 9, 2012 at 11:39 PM, Jeff <jbla...@mitre.org> wrote:

> Hi all,
>
> I need to be able to determine, at .save() time (before I call the
> parent class' .save()), if a certain field on my model object was
> changed, and act on that via some custom code.  How can I do this,
> bearing in mind that we call .save() from non-web code, etc?  We use
> Django's ORM from various other non-web interfaces and code.  My point
> is that we can't just inspect a web form's result data.
>
> I'd appreciate any thoughts.
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to