#5925: Unable to use url reverse feature in redirect argument of decorator
user_passes_test
---------------------------------+------------------------------------------
   Reporter:  anonymous          |                Owner:  nobody       
     Status:  new                |            Component:  Uncategorized
    Version:  SVN                |           Resolution:               
   Keywords:  reverse,decorator  |                Stage:  Unreviewed   
  Has_patch:  0                  |           Needs_docs:  0            
Needs_tests:  0                  |   Needs_better_patch:  0            
---------------------------------+------------------------------------------
Changes (by yml):

 * cc: [EMAIL PROTECTED] (added)
  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 One other side effect of the issue describes above is that it breaks the
 url resolution for reverse, {%url%}, permalink and company.
 I have the case in one of my application where some views are protected by
 :
 """
 @user_passes_test(lambda u: Group.objects.get(name='admin') in
 u.groups.all(), login_url=reverse("auth_login"))
 """
 This lead to some nasty bugs in the url resolution of an other view.

 I hope this description will help.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5925#comment:1>
Django Code <http://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 post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to