Custom Query (26902 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 26902)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#28974 fixed Model.refresh_from_db() should pass the refreshed instance as a database hint nobody Simon Charette
Description

While reviewing the patch for #28918 and reflecting about #28939 I noticed that the refresh_from_db() method was duplicating the work the routers do when an instance hint is provided.

I figured out that we we're better of using db_manager(using, hints={'instance': self}) in this case which would also have the benefit of passing down instance as an hint to possibly defined custom routers.

#28971 fixed EmailMessage.message() does not override Cc header from extra_headers dict (unlike From, To, and Reply-To) nobody Jon Dufresne
Description

Compare how CC is built:

https://github.com/django/django/blob/2.0/django/core/mail/message.py#L259

To how the other headers are built:

Notice, unlike the others, Cc does not first use the .extra_headers dict. Like the other headers, should be able to use the .extra_headers to override Cc.

PR

#28970 wontfix Option to suppress signals on save to avoid loop nobody Gustavo Henrique de Almeida Gonçalves
Description

Calling instance.save() inside a post_save signal receiver causes a loop and max recursion error. This problem is very easy to fall into and the best solution at the moment is call the QuerySet update() method, so that the post_save signal is not called in this case.

This is a very ugly workaround. I think Django should give the option to call save() and explicitly suppress signal emitting. For example:

instance.save(post_save=False)

In the above method call, post_save signal would not be sent, and the loop problem would not occurs.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Note: See TracQuery for help on using queries.
Back to Top