Changes between Initial Version and Version 1 of Ticket #26239, comment 3


Ignore:
Timestamp:
Mar 10, 2016, 8:04:27 AM (9 years ago)
Author:
Tim Graham

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26239, comment 3

    initial v1  
    1 Replying to [comment:2 AMaini503]:
    2 > Replying to [ticket:26239 boussouira]:
    3 > > I don't know if this is a bug or not, but when using `update()`, the DateTime fields with `auto_now` are not updated to the current time. The documentation of `auto_now` doesn't say anything about that situation.
    4 > > For example:
    5 > >
    6 > > {{{
    7 > > #  This won't update `updated_at`:
    8 > > Order.objects.filter(user_id=7).update(check_count=3)
    9 > >
    10 > > # You have to explicitly include it in update()
    11 > > Order.objects.filter(user_id=7).update(check_count=3, updated_at=timezone.now())
    12 > > }}}
    13 >
    14 > --> I will try to work on this. But should update be modified to include timestamp by itself or documentation should be altered to state that timestamp needs to be passed explicitly ?
    15 
    161Hello, can someone confirm if this requires modifying code or just documentation?
Back to Top