#12610: Fixture loading is interfered by signal handlers
---------------------------------------------+------------------------------
Reporter: jtiai | Owner: nobody
Status: new | Milestone:
Component: django-admin.py | Version: SVN
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Changes (by russellm):
* needs_better_patch: => 0
* stage: Unreviewed => Design decision needed
* needs_tests: => 0
* needs_docs: => 0
Comment:
There is already a hook to check for this - data saved during a fixture
load is loaded 'raw', and the 'raw' argument is passed to the pre/post
save handlers. If you modify your pre/post save handlers to do nothing in
the case of a raw save, you should be able to load fixtures without the
problems you describe.
There might be an argument to be made that raw saves should disable
signals completely - after all, the purpose of raw save is to prevent any
clever 'on save' logic from being executed, and excluding signals from
that process would make some sense. However, this could also be considered
a backwards incompatibility. Marking DDN until we make that decision. Feel
free to raise this on django-dev if you want to promote the idea.
--
Ticket URL: <
http://code.djangoproject.com/ticket/12610#comment:1>