Hello,

I am experiencing an inconvenience in regards to working with signals
on model instances with deferred attributes. Specifically I am trying
to get a post_save signal to fire from a save() call on such a model
instance.

The problem is that the sender class (`origin` in
django.db.models.base.ModelBase.save_base) will be the special
deferred class as returned by
django.db.models.query_utils.deferred_class_factory and not the actual
model class. Thus a subscription to post_save on the real model class
will not receive the signal signaled by the deferred class.

An obvious workaround would be to just override the save() method. If
however this behavior is intentional, I think this should be at least
noted in the documentation (on the defer() method) to save others
wasting time on debugging why their signals doesn't fire.

Regards,
Christian

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

Reply via email to