Oh thanks Russel!

Turns out django-tagging was creating those objects via the post-save
signal hook.

http://code.djangoproject.com/ticket/8399 <- here is the ticket which
proposes an option to disable the signal handling during the loaddata
operation.

Malcolm says that some people might want to use signals while running
loaddata - ie to create related objects.

I don't really understand why anyone would want that -- the only use
case I've ever seen for the loaddata operation was "dump the entire
database -> load entire database", though I guess use cases differ.

Any updated comments on disabling the signal handling for the loaddata
operation?

On Mar 30, 5:30 pm, Russell Keith-Magee <russ...@keith-magee.com>
wrote:
> On Wed, Mar 30, 2011 at 2:21 PM, George Karpenkov
>
> <true.chesh...@gmail.com> wrote:
> > If we'll look into core/management/commands/loaddata we'll see the
> > line
> > "obj.save(using=using)" which saves the data.
>
> ... and if you dig a little deeper, you'll find that "obj" in that
> context is a "DeserializedObject", and calling save() on a
> deserialized object invokes a "raw save" on the underlying object's
> base save.
>
> That is, the save() method on the object *shouldn't* be invoked as a
> result of loading a fixture. That's what was reported in #4459, and
> fixed in r5658.
>
> If you can provide a test case that demonstrates otherwise, please
> open a ticket.
>
> Yours,
> Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to