Changes between Initial Version and Version 1 of Ticket #27340, comment 4
- Timestamp:
- Oct 26, 2016, 1:15:19 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27340, comment 4
initial v1 8 8 With the proposed change we'd be able to avoid doing two database queries for every Model.save by doing this: 9 9 10 10 {{{ 11 11 @signals.pre_init.connect 12 12 def _track_changes(instance, args, kwargs, **kwargs): 13 13 instance._original_args = args, kwargs 14 }}} 14 15 15 16 There's no other way as far as I can find, as we don't want to monkeypatch Model, and in any case it's very strange that the pre_init signal omits the instance being created.