#28978: Djano m2m changed signal model argument is acting wierd
-------------------------------------+-------------------------------------
               Reporter:  Dev        |          Owner:  nobody
  Aggarwal                           |
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Database   |        Version:  2.0
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 I hace a  signal for m2m changed defined like this


 {{{
 @receiver(signals.m2m_changed, sender=models.Exam.questions.through)
 def exam_questions_change(sender, instance, action, reverse, model,
 pk_set, using, **kwargs):
     print(repr(model))
     print(model.___class___)
     print(isinstance(model, models.Question))
 }}}

 And it gives me the following output
 {{{
 <class 'App.models.Question'>
 <class 'django.db.models.base.ModelBase'>
 False
 }}}


 What is going on here?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28978>
Django <https://code.djangoproject.com/>
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/049.dbfb949b0b3373de8338ba022d25f814%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to