Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2017-04-28 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by rgangopadhya):

 To handle pre_save and all other signals, I took the approach of sending
 all signals to the parent model when triggered by child models:


 {{{
 from django.db import models
 from django.db.models.signals import (
 pre_save,
 post_save,
 pre_delete,
 post_delete,
 m2m_changed,
 )

 class A(models.Model): pass

 class B(A):
 class Meta:
 proxy = True

 signals = [
 pre_save,
 post_save,
 pre_delete,
 post_delete,
 m2m_changed,
 ]

 def make_sender_fn(model, signal):

 def sender_fn(sender, **kwargs):
 # signal send method passes itself
 # as a signal kwarg to its receivers
 kwargs.pop('signal')
 signal.send(sender=model, **kwargs)

 return sender_fn

 def connect_all_signals(from_model, to_model):
 # connecting signals from one model to another
 # is useful when from_model inherits from to_model
 # and hence should take on all behavior from the
 # parent model
 # Django does not send signals for parent model
 # when child is triggered
 # https://code.djangoproject.com/ticket/9318#no1
 for signal in signals:
 signal.connect(
 make_sender_fn(to_model, signal),
 sender=from_model,
 weak=False,
 )

 connect_all_signals(B, A)
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.89435f2acdcdbf212101deca2d596e49%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2017-04-27 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Soheil Damangir):

 A quick fix without a need to patch could be to override the save method
 for the parent mode:

 {{{
  from django.db import models

  class MyModel(models.Model):
 """
 >>> m = MyModel(name="The model")
 >>> m.save()
 Hello!
 """
 name = models.CharField(max_length=10)
 def save(self, *args, **kwargs):
 # To trigger the signals for parent model
 klass = self.__class__
 try:
 if self.__class__._meta.proxy:
 self.__class__ = self.__class__._meta.concrete_model
 super(MyModel, self).save(*args, **kwargs)
 finally:
 self.__class__ = klass

  class ProxyModel(MyModel):
 """
 >>> p = ProxyModel(name="Proxy")
 >>> p.save()
 Hello!
 """
 class Meta:
 proxy = True


  from django.db.models.signals import post_save

  def say_hello(sender, *args, **kwargs):
  print "Hello!"
  post_save.connect(say_hello, sender=Parent)
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.86e657a6a6ec1c219ef2cf20e8fbfbf4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2017-04-25 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Simon Charette):

 Derek, FWIW deferred models are not an issue anymore from Django 1.10+.
 See #26207 for more details.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.6b345662ba1c4e73ed8199c4df72abc7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2017-04-25 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Derek Frank):

 This is also an issue for deferred querysets.

 `queryset = Blog.objects.only('pk')`
 `queryset.delete()` will not run handlers for pre_delete and post_delete
 signals.

 It appears a new class type is defined for the deferred object.
 `id(queryset.first().__class__) == id(Blog)` --> `False`

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.42792863910aa0fee1ce59d9541d4515%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2017-04-19 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin):

 I found a workaround that doesn't require patching Django, but that may
 affect performance:

 {{{#!python
 # Because of https://code.djangoproject.com/ticket/9318, declaring
 # `@dispatch.receiver(..., sender=myapp.MyModel, ...)` wouldn't
 # trigger this function when a subclass is saved. So we perform the check
 # manually with `issubclass(sender, myapp.MyModel)`. This is
 # inefficient because any save(), for any model, now calls this function.
 @dispatch.receiver(signals.post_save)
 def request_saved(sender, instance, created, **kwargs):
 if not issubclass(sender, myapp.MyModel):
 return
...
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.af5e5b90428eacac231c95e5f4826eb8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2016-12-07 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aymeric Augustin):

 * type:  Bug => New feature


Comment:

 For proxy models it's a straightforward bug.

 For multi-table inheritance it's more complicated.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.b005edac927839da6df9d2bc48a2137a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2016-12-07 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  Alexander Artemenko  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aymeric Augustin):

 * type:  New feature => Bug


Comment:

 I hit this bug today.

 It's really a silent data loss issue: creating a proxy model shouldn't
 disable behavior of the original model.

 I'm applying the following patch to Django until this is resolved:

 {{{
 --- a/django/db/models/base.py  2016-12-07 17:09:16.0 +0100
 +++ b/django/db/models/base.py  2016-12-07 17:13:18.0 +0100
 @@ -810,13 +810,12 @@
  using = using or router.db_for_write(self.__class__,
 instance=self)
  assert not (force_insert and (force_update or update_fields))
  assert update_fields is None or len(update_fields) > 0
 -cls = origin = self.__class__
 -# Skip proxies, but keep the origin as the proxy model.
 +cls = self.__class__
  if cls._meta.proxy:
  cls = cls._meta.concrete_model
  meta = cls._meta
  if not meta.auto_created:
 -signals.pre_save.send(sender=origin, instance=self, raw=raw,
 using=using,
 +signals.pre_save.send(sender=cls, instance=self, raw=raw,
 using=using,
update_fields=update_fields)
  with transaction.atomic(using=using, savepoint=False):
  if not raw:
 @@ -829,7 +828,7 @@

  # Signal that the save is complete
  if not meta.auto_created:
 -signals.post_save.send(sender=origin, instance=self,
 created=(not updated),
 +signals.post_save.send(sender=cls, instance=self,
 created=(not updated),
 update_fields=update_fields, raw=raw,
 using=using)

  save_base.alters_data = True
 }}}

 IMO this is the correct way to fix the issue. I understand the concern
 about backwards compatibility but I have a hard time figuring out a
 realistic scenario where developers would purposefully rely on this bug.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.630e023c9042a3fea04a8cbdf44a8229%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2016-08-08 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by sassanh):

 Any updates? Workarounds?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.4dd2fb4bfc24da6c21137d7ee5cd53ac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2016-05-07 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:
 Type:  New feature  |   Status:  new
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timgraham):

 * status:  assigned => new
 * owner:  jdunck =>


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.813ddaa60223c99aa435a3b77e9e95cb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2015-01-05 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by charettes):

 I think the last effort toward fixing this was jdunck's branch which is
 not available anymore.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.3ff9430aab3db234a0151bc18d42%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2015-01-04 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |
  subclass   |
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by torstenrudolf):

 Is there any update on this issue?

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.3fdc054fbeb845f7c3f477c7a09f3802%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2013-09-15 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |  Needs documentation:  0
  subclass   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by loic84):

 * cc: loic@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.1cbe1710f8e0f39b437f98143cfc1e73%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2012-09-30 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |  Needs documentation:  0
  subclass   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by brooks.travis@…):

 * cc: brooks.travis@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2012-06-04 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |  Needs documentation:  0
  subclass   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by jdunck):

 I've started a branch to work on this problem:
 https://github.com/votizen/django/tree/virtual_signals

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2012-04-12 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |  Needs documentation:  0
  subclass   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by charettes):

 * cc: charette.s@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2012-04-12 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |  Needs documentation:  0
  subclass   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by streeter):

 * cc: streeter (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2012-04-12 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |  Needs documentation:  0
  subclass   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by carljm):

 Replying to [comment:20 carljm]:
 > I'll also repeat one comment I made on #18094: I think a fix that relies
 on opt-in from the person registering the signal handler is not adequate,
 as this is often not the same person who might be creating a subclass
 (particularly a proxy subclass). A reusable app that registers a signal
 handler for a model ought to be able to assume that that handler will fire
 when instances of that model are involved, without needing to take special
 opt-in steps to ensure that this is still the case when subclasses are
 involved.

 Although I suppose that this might be a necessary concession to backwards
 compatibility - in that case, it should be featured in the documentation,
 as I would think that most new code should register signal handlers using
 this new opt-in flag (and perhaps we should even consider deprecating the
 flag over time in favor of making this the default behavior).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2012-04-12 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |  Needs documentation:  0
  subclass   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-

Comment (by carljm):

 Closed #18094 as a duplicate - there's some useful discussion there. Also,
 there's a mailing list thread at https://groups.google.com/d/msg/django-
 developers/2aDFeNAXJgI/-riTuIgNLPQJ

 If a fix is put into place within the signals framework itself, then the
 pre/post_delete signal behavior should be changed so that it does not fire
 separate signals for parent model classes, which it does now (unlike the
 save and init signals).

 I'll also repeat one comment I made on #18094: I think a fix that relies
 on opt-in from the person registering the signal handler is not adequate,
 as this is often not the same person who might be creating a subclass
 (particularly a proxy subclass). A reusable app that registers a signal
 handler for a model ought to be able to assume that that handler will fire
 when instances of that model are involved, without needing to take special
 opt-in steps to ensure that this is still the case when subclasses are
 involved.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2011-10-05 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
 Reporter:  svetlyak40wt |Owner:  jdunck
 Type:  New feature  |   Status:  assigned
Component:  Core (Other) |  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:  model inheritance,   | Triage Stage:  Accepted
  signals, dispatch, proxy,  |  Needs documentation:  0
  subclass   |  Patch needs improvement:  1
Has patch:  1|UI/UX:  0
  Needs tests:  0|
Easy pickings:  0|
-+-
Changes (by Semmel):

 * cc: Florian.Sening@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2011-08-19 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
   Reporter: |  Owner:  jdunck
  svetlyak40wt   | Status:  assigned
   Type:  New|  Component:  Core (Other)
  feature|   Severity:  Normal
  Milestone:  1.3|   Keywords:  model inheritance,
Version:  1.0|  signals, dispatch, proxy, subclass
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  1  |
  UI/UX:  0  |
-+-

Comment (by erick.yellott@…):

 Replying to [comment:16 jdunck]:
 > This is the right place.  Sorry I still haven't had time to do a patch
 on this.

 Okay, cool. Thanks for the quick response.  I've been scratching my head
 for a couple of days.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2011-08-19 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
   Reporter: |  Owner:  jdunck
  svetlyak40wt   | Status:  assigned
   Type:  New|  Component:  Core (Other)
  feature|   Severity:  Normal
  Milestone:  1.3|   Keywords:  model inheritance,
Version:  1.0|  signals, dispatch, proxy, subclass
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  1  |
  UI/UX:  0  |
-+-

Comment (by jdunck):

 This is the right place.  Sorry I still haven't had time to do a patch on
 this.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2011-08-19 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
   Reporter: |  Owner:  jdunck
  svetlyak40wt   | Status:  assigned
   Type:  New|  Component:  Core (Other)
  feature|   Severity:  Normal
  Milestone:  1.3|   Keywords:  model inheritance,
Version:  1.0|  signals, dispatch, proxy, subclass
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  1  |
  UI/UX:  0  |
-+-
Changes (by erick.yellott@…):

 * ui_ux:   => 0
 * easy:   => 0


Comment:

 The example towards the top with Parent and Child looks like it uses
 Concrete Table Inheritance. Does this work for Single Table inheritance?
 I'm coming from a symfony1.4 and Propel1.6 background and just switched to
 Django1.3 within the week, so maybe I'm just doing it wrong, but for my
 models that inherit an abstract class the signal isn't bubbling up to the
 parent class.

 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
 from django.db import models
 from django.db.models.signals import pre_save

 class BaseQBObject(models.Model):

 class Meta:
 abstract = True

 def __unicode__(self):
 if hasattr(self, 'fullname'):
 return self.fullname


 def callback(sender, *args, **kwargs):
 print 'HERE'

 pre_save.connect(callback, sender=BaseQBObject)


 class Account(BaseQBObject):
   # Stuff

   }}}
 }}}


 I would expect saving the child class would print 'HERE', but specifying
 sender=BaseQBObject doesn't seem to work as I would expect.

 Sorry if I'm posting this in the wrong place.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2011-03-25 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+-
   Reporter: |Owner:  jdunck
  svetlyak40wt   |Milestone:  1.3
 Status:  assigned   |  Version:  1.0
  Component:  Core   | Keywords:  model inheritance,
  framework  |  signals, dispatch, proxy, subclass
 Resolution: |Has patch:  1
   Triage Stage:  Accepted   |  Needs tests:  0
Needs documentation:  0  |
Patch needs improvement:  1  |
-+-
Changes (by vzima):

 * cc: vlastimil.zima@… (added)


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2011-02-26 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
--+-
   Reporter:  svetlyak40wt| Owner:  jdunck  
 
 Status:  assigned| Milestone:  1.3 
 
  Component:  Core framework  |   Version:  1.0 
 
 Resolution:  |  Keywords:  model inheritance, 
signals, dispatch, proxy, subclass
   Triage Stage:  Accepted| Has patch:  1   
 
Needs documentation:  0   |   Needs tests:  0   
 
Patch needs improvement:  1   |  
--+-
Changes (by lrekucki):

  * needs_better_patch:  0 => 1


Comment:

 Ticket gardening.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2011-02-24 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
--+-
   Reporter:  svetlyak40wt| Owner:  jdunck  
 
 Status:  assigned| Milestone:  1.3 
 
  Component:  Core framework  |   Version:  1.0 
 
 Resolution:  |  Keywords:  model inheritance, 
signals, dispatch, proxy, subclass
   Triage Stage:  Accepted| Has patch:  1   
 
Needs documentation:  0   |   Needs tests:  0   
 
Patch needs improvement:  0   |  
--+-
Changes (by jdunck):

  * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2011-02-24 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
--+-
   Reporter:  svetlyak40wt| Owner:  jdunck  
 
 Status:  new | Milestone:  1.3 
 
  Component:  Core framework  |   Version:  1.0 
 
 Resolution:  |  Keywords:  model inheritance, 
signals, dispatch, proxy, subclass
   Triage Stage:  Accepted| Has patch:  1   
 
Needs documentation:  0   |   Needs tests:  0   
 
Patch needs improvement:  0   |  
--+-
Changes (by jdunck):

  * owner:  nobody => jdunck


Comment:

 I was somehow unaware of this problem but just tripped across it.  Will
 try to sprint on at PyCon.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2010-08-05 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+--
  Reporter:  svetlyak40wt| Owner:  nobody   

Status:  new | Milestone:  1.3  

 Component:  Core framework  |   Version:  1.0  

Resolution:  |  Keywords:  model inheritance, 
signals, dispatch, proxy, subclass
 Stage:  Accepted| Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Changes (by bronger):

 * cc: bronger (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2010-06-03 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+--
  Reporter:  svetlyak40wt| Owner:  nobody   

Status:  new | Milestone:  1.3  

 Component:  Core framework  |   Version:  1.0  

Resolution:  |  Keywords:  model inheritance, 
signals, dispatch, proxy, subclass
 Stage:  Accepted| Has_patch:  1

Needs_docs:  0   |   Needs_tests:  0

Needs_better_patch:  0   |  
-+--
Changes (by DrMeers):

 * cc: DrMeers (added)
  * keywords:  model inheritance, signals, dispatch => model inheritance,
   signals, dispatch, proxy, subclass
  * milestone:  => 1.3

Comment:

 Same problem with proxy models

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2010-02-16 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+--
  Reporter:  svetlyak40wt| Owner:  nobody   
   
Status:  new | Milestone:   
   
 Component:  Core framework  |   Version:  1.0  
   
Resolution:  |  Keywords:  model inheritance, 
signals, dispatch
 Stage:  Accepted| Has_patch:  1
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Changes (by alexr):

 * cc: alexr (added)

Comment:

 You can get around this pretty easily. When you register the signal, don't
 specify a sender. Then, inside the signal handler, just do an isinstance
 test.

 For example:

 {{{
 signals.py
 def my_handler(sender, **kwargs):
 from app.models import Parent #Avoid circular import
 if not isinstance(instance, Parent):
  return
 #do normal signal stuff here

 models.py
 post_save.connect(my_handler)
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

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



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2009-09-03 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+--
  Reporter:  svetlyak40wt| Owner:  nobody   
   
Status:  new | Milestone:   
   
 Component:  Core framework  |   Version:  1.0  
   
Resolution:  |  Keywords:  model inheritance, 
signals, dispatch
 Stage:  Accepted| Has_patch:  1
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Changes (by benbest86):

 * cc: benbest86 (added)

Comment:

 I have come across the need for this as well - especially when overriding
 defaults of other projects by inheritance instead of forking.

 One (relatively) easy way to deal with this is to listen on the relevant
 child class signals and send the base class signal from there. This way
 you can still attach all of your common signals to the base class and not
 worry about adding a new one to each child for every new listening
 function.

 Ex:

 {{{
 class Child(Parent):
 pass
 def call_parent_post_save(sender, instance, created, **kwargs):
 post_save.send(sender=Parent,
 instance=Parent.objects.get(id=instance.id), created=created, **kwargs)
 post_save.connect(call_parent_post_save, sender=Child)
 }}}

 Not sure if there is a better way to get the proper instance though -
 haven't found a great way to do this directly from the existing instance
 instead of using a query. Any thoughts would be appreciated.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2009-02-16 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+--
  Reporter:  svetlyak40wt| Owner:  nobody   
   
Status:  new | Milestone:   
   
 Component:  Core framework  |   Version:  1.0  
   
Resolution:  |  Keywords:  model inheritance, 
signals, dispatch
 Stage:  Accepted| Has_patch:  1
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Changes (by idangazit):

 * cc: idangazit (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2008-12-05 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+--
  Reporter:  svetlyak40wt| Owner:  nobody   
   
Status:  new | Milestone:   
   
 Component:  Core framework  |   Version:  1.0  
   
Resolution:  |  Keywords:  model inheritance, 
signals, dispatch
 Stage:  Accepted| Has_patch:  1
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Comment (by Alex):

 Why not just use klass.__bases__ to avoid any special dependence on
 knowing it's a model.  I realize it isn't a common case to have signals
 who's sender isn't a model, but I don't see any overhead in allowing it.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2008-12-05 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+--
  Reporter:  svetlyak40wt| Owner:  nobody   
   
Status:  new | Milestone:   
   
 Component:  Core framework  |   Version:  1.0  
   
Resolution:  |  Keywords:  model inheritance, 
signals, dispatch
 Stage:  Accepted| Has_patch:  1
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Comment (by telenieko):

 I guess you are talking about:
 {{{
 #!python
  from django.db import models

  class Parent(models.Model):
 """
 >>> p = Parent(name="Hola")
 >>> p.save()
 Hello!
 """
 name = models.CharField(max_length=10, blank=True, default='')

  class Child(Parent):
 """
 >>> p = Child(name="Hola ahora")
 >>> p.save()
 Hello!
 """
 childname = models.CharField(max_length=10, blank=True, default='')

  from django.db.models.signals import post_init
  from django.db.models.signals import post_save

  def say_hello(sender, *args, **kwargs):
  print "Hello!"
  post_save.connect(say_hello, sender=Parent)
 }}}

 ?? The doctest that fails (the one in Child) should be considered a bug.

 One would really expect that it's signal handlers still fire on a class
 althought having been inherited (I'd guess that's how most languages
 handle this).

 A side, reading the docs about pre_init and post_init, you'd expect that
 if you Model's __init__() method is run, handlers attached to this should
 also be fired, which isn't the case.

 So, in brief, handlers attached to a Model should be fired when signals
 get sent from Child Models. Having it disabled by default can confuse
 people, but maybe we could disable this until 2.0 :)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9318: "Virtual" behaviour for signal dispatcher and model inheritance

2008-10-07 Thread Django
#9318: "Virtual" behaviour for signal dispatcher and model inheritance
-+--
  Reporter:  svetlyak40wt| Owner:  nobody   
   
Status:  new | Milestone:   
   
 Component:  Core framework  |   Version:  1.0  
   
Resolution:  |  Keywords:  model inheritance, 
signals, dispatch
 Stage:  Accepted| Has_patch:  1
   
Needs_docs:  0   |   Needs_tests:  0
   
Needs_better_patch:  0   |  
-+--
Changes (by mtredinnick):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 The principle seems sound enough, although we need to think hard about
 whether to turn this on by default, since it will change existing
 behaviour in backwards-incompatible ways for some signal handlers. It
 could be controlled in an "off by default" way by adding a flag to the
 connect method, indicating that we also wish to receive emits that
 originated on the child. We should consider adding a parameter like
 "from_child" to signal emits to indicate if the signal is coming from a
 sub-class so that handlers have an opportunity to avoid duplicate work.

 On an implementation note (and the patch needs more careful examination
 than I've given it just now, but this stood out), if we're going to "leak"
 information about `_meta` and parents into dispatcher.py, we might as well
 just test if it's an instance of `django.db.models.Model`, rather than
 seeing if it's a class with a `_meta` attribute. But there could be some
 other way to structure that entirely so that working out the right
 emitting classes to use can be more self-contained within a model itself
 and the dispatcher.py could avoid knowing about that. Needs some
 thought/creativity.

 I'll make this "accepted", since it's a feature worth adding, but what
 shape the final feature will take still needs a bit of consideration, I
 feel.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---