There are of course stackoverflow postings -e.g. 
https://stackoverflow.com/questions/17474057/enforce-auto-now-when-using-saveupdate-fields
 - 
is almost 6 years old.

On Monday, March 25, 2019 at 4:30:57 PM UTC+1, Sebastian Haase wrote:
>
> Hi,
> in section "Specifying which fields to save" (
> https://docs.djangoproject.com/en/dev/ref/models/instances/#specifying-which-fields-to-save)
>  
> it reads that `update_fields` can be specified mostly for performance 
> benefits...
> However, I found that regarding a field with "auto_now=True" there is a 
> different outcome.
> IOW, specifying `update_fields` can be used to keep the old date in 
> respective  "auto_now=True"-field UNLESS that field is also explicitly 
> given un `update_fields`
>
> I hope I got this correct - at least that was the impression from my own 
> tests with Django 2.1. Than this should be more prominently stated in the 
> documentation.
>
> Thanks for Django.
> Sebastian
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0eabc3b1-ac4b-491b-a44b-0db1e611e85e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to