#12750: Middleware snippet getting error in 1.2 alpha 1 - AttributeError:
'MethodDecoratorAdaptor' object has no attribute 'func_code
------------------------------------+---------------------------------------
          Reporter:  phoebebright   |         Owner:  nobody               
            Status:  closed         |     Milestone:                       
         Component:  Uncategorized  |       Version:  1.2-alpha            
        Resolution:  invalid        |      Keywords:  middleware, decorator
             Stage:  Unreviewed     |     Has_patch:  0                    
        Needs_docs:  0              |   Needs_tests:  0                    
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by lukeplant):

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

Comment:

 Your code relied on the implementation of the user_passes_test decorator -
 in particular the _CheckLogin object, which is why it has broken, because
 that implementation has changed.

 In your case, it looks like you are assuming that if the callable does not
 have an attribute 'view_func', then it is a function.  That is an
 obviously false assumption.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12750#comment:2>
Django <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