Iqbal Abdullah kirjoitti:
> Hi guys,
> 
> I have a quick question:
> 
> I have set auto_now=True for one of my DateTimeFields.
> 
> Lets say I have a model object like so:
> 
>>> a = MyModel.objects.get(id="10")
>>> print a.id
>>> "10"
>>> a.id = "10"
>>> a.save()
> 

Yes.

Django doesn't have "dirty" flag in models or do field by field compare.
So it will always issue insert/update clause when you do "save".


-- 
Jani Tiainen

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to