#30571: Incorrect value of kwargs in pre_init signal documentation.
-------------------------------------+-------------------------------------
     Reporter:  singhpratyush        |                    Owner:  Hasan
         Type:                       |  Ramezani
  Cleanup/optimization               |                   Status:  closed
    Component:  Documentation        |                  Version:  2.2
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  signals              |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * status:  assigned => closed
 * resolution:   => invalid


Comment:

 Ahh, sorry but I just realized that everything works properly. If you will
 change your method signature, to the
 {{{
 @receiver(signals.pre_init, sender=user_models.Follower)
 def prevent_user_following_self(sender, args, kwargs, **other):
     print(kwargs)
     print(args)
 }}}
 then you will get `args` and `kwargs` as described in
 [https://docs.djangoproject.com/en/2.2/ref/signals/#pre-init
 documentation].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30571#comment:4>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.07ff1aaa8597220667037f9bce1d9b32%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to