I have a model which has an auto_now date field for checking update
time.
But as you know there will always be exceptions.
I have to prevent updating auto_nowed field for just one action.
Is it possible?
Or should I remove auto_now and update the date field whenever
updating the model?
Regards,
KwonNam.
It is not possible in 0.96, but it is possible on trunk. A recently
added feature allows you to call:
instance.save(raw=True)
which will prevent any field pre-processing (like auto_add) from being
executed during the save. See:
http://www.djangoproject.com/documentation/db-api/#raw-saves
for details.
Yours,
Russ Magee %-)
If you can't update to trunk, this would probably be your easiest
solution. It should only be a few lines of code.
-rob