I'm writing a review of my Django experience, and there's something I
want to fact-check before I complain about it.
Is there a way to "catch" a property change so I can run some code at
the time?
Example:
--------
class Entry(models.Model):
...
post_date = models.DateTimeField(...)
posted = models.BooleanField(...)
e = Entry.create()
e.save()
e.posted = True
--------
I want to be able to run some code on the last line to automatically
update 'post_date' at that time.
It would also be acceptable to do this in a .save() override, but I
can't find a (documented/supported) way to access the old value to
compare it against the new value at that time.
This would cleanly solve several problems for me, many of which are
more complicated and tricky than this minimal example.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---