summaryrefslogtreecommitdiff
path: root/django/db/models/signals.py
AgeCommit message (Collapse)Author
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-03-05Fixed #31327 -- Deprecated providing_args argument for Signal.Jon Dufresne
2018-02-01Fixed imports per isort 4.3.0.Mariusz Felisiak
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-17Refs #24205 -- Removed Signal.disconnect()'s weak argument.Tim Graham
Per deprecation timeline.
2016-06-18Fixed #26778 -- Fixed ModelSignal.connect() weak argument.Tim Graham
2016-06-02Fixed #26686 -- Fixed crash when registering model signals with abstract ↵Alex Hill
senders.
2016-05-27Fixed #26642 -- Made ModelSignal.disconnect() work with lazy references.Alex Hill
2016-05-19Fixed #26421 -- Refactored ModelSignal to use Apps.lazy_model_operation()Alex Hill
2016-05-15Fixed #24100 -- Made the migration signals dispatch its plan and apps.Simon Charette
Thanks Markus for your contribution and Tim for your review.
2015-01-17Removed pre_syncdb and post_syncdb signals per deprecation timeline.Tim Graham
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-01-12Fixed #21477 -- Renamed db to using in pre/post_migrate signals.Aymeric Augustin
2013-12-29Refactored the migration signals to use app configs.Aymeric Augustin
De-aliased pre/post_syncdb to pre/post_migrate to increase backwards-compatibility.
2013-12-28Changed get_model to raise an exception on errors.Aymeric Augustin
Returning None on errors required unpythonic error checking and was inconsistent with get_app_config. get_model was a private API until the previous commit, but given that it was certainly used in third party software, the change is explained in the release notes. Applied the same change to get_registered_model, which is a new private API introduced during the recent refactoring.
2013-12-28Stopped calling apps.get_model with only_installed=False.Aymeric Augustin
ContentTypes are only created for installed applications, and I could make a case for not returning a model that isn't installed any more. The check for stale ContentTypes in update_contenttypes doesn't use model_class. ModelSignal actually needs get_registered_model since the lookup happens at import time. I took this opportunity to perform a small refactoring.
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-17Moved the new app cache inside core.Aymeric Augustin
2013-12-17Removed module-level functions for the app cache.Aymeric Augustin
Since the original ones in django.db.models.loading were kept only for backwards compatibility, there's no need to recreate them. However, many internals of Django still relied on them. They were also imported in django.db.models. They never appear in the documentation, except a quick mention of get_models and get_app in the 1.2 release notes to document an edge case in GIS. I don't think that makes them a public API. This commit doesn't change the overall amount of global state but clarifies that it's tied to the app_cache object instead of hiding it behind half a dozen functions.
2013-12-17Moved django.db.models.loading to django.apps.cache.Aymeric Augustin
This commit doesn't contain any code changes; it's purely a refactoring.
2013-11-24Fixed #21391 -- Allow model signals to lazily reference their senders.Simon Charette
2013-08-21Fixed #20943 -- Weakly reference senders when caching their associated receiversSimon Charette
2013-07-30Rename pre_ and post_syncdb to *_migrate, with aliases from old namesAndrew Godwin
2013-05-23Fixed #11398 - Added a pre_syncdb signalDonald Stufft
2013-01-03Added documentation for the 'db' argument of the post-syncdb signal.mpaolini
2012-12-16Fixed #16679 -- Use caching to speed up signal sendingAnssi Kääriäinen
2012-05-12Fixed #4102 -- Allow update of specific fields in model.save()Andrei Antoukh
Added the ability to update only part of the model's fields in model.save() by introducing a new kwarg "update_fields". Thanks to all the numerous reviewers and commenters in the ticket
2010-08-07Fixed #13552 -- Added a 'using' parameter to database signals. Thanks to ↵Russell Keith-Magee
gmandx for the suggestion, and Andrew Godwin for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13538 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-13Fixed #5390 -- Added signals for m2m operations. Thanks to the many people ↵Russell Keith-Magee
(including, most recently, rvdrijst and frans) that have contributed to this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-06Major refactoring of django.dispatch with an eye towards speed. The net ↵Jacob Kaplan-Moss
result is that signals are up to 90% faster. Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes. Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated. Documentation is, sigh, still forthcoming. Fixes #6814 and #3951 (with the new dispatch_uid argument to connect). git-svn-id: http://code.djangoproject.com/svn/django/trunk@8223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty
backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37