#24276: django.contrib.auth.decorators.user_passes_test doesn't pass *args and
*kwargs to resolve_url
-------------------------------------+-------------------------------------
     Reporter:  rubengrill           |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  contrib.auth         |                  Version:  1.7
     Severity:  Normal               |               Resolution:
     Keywords:  login_url            |             Triage Stage:
  resolve_url login_required         |  Unreviewed
  user_passes_test                   |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timgraham):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * easy:  1 => 0
 * needs_docs:   => 0


Comment:

 I think there is a problem with your approach and that is that if I use
 the decorator on a page with some capture parameters but the login page
 doesn't use those same parameters, `resolve_url()` won't work. I'm
 attaching a modification to one of Django's current tests that
 demonstrates the issue. I'll leave the ticket open if you want to think
 about other solutions, but it might be easiest for you to use a custom
 decorator for your use case.

--
Ticket URL: <https://code.djangoproject.com/ticket/24276#comment:1>
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/068.01315b8974a5f2404749a300bbfb6ef5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to