id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 12750,Middleware snippet getting error in 1.2 alpha 1 - AttributeError: 'MethodDecoratorAdaptor' object has no attribute 'func_code,Phoebe Bright,nobody,"Section of code causing error: {{{ from django.core.urlresolvers import resolve view_func, args, kwargs = resolve(request.META['PATH_INFO']) if hasattr(view_func,'view_func'): # it the view_func has a view_func then its a decorator co = view_func.view_func.func_code else: co = view_func.func_code <---- fails here Traceback: Traceback (most recent call last): File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/servers/basehttp.py"", line 280, in run self.result = application(self.environ, self.start_response) File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/servers/basehttp.py"", line 672, in __call__ return self.application(environ, start_response) File ""/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/handlers/wsgi.py"", line 245, in __call__ response = middleware_method(request, response) File ""/Users/phoebebr/Development/tinycomms/tinycomm/debug_middleware.py"", line 117, in process_response co = view_func.func_code AttributeError: 'MethodDecoratorAdaptor' object has no attribute 'func_code' [01/Feb/2010 17:38:49] ""GET /who/availability/ HTTP/1.1"" 500 841 }}} ",,closed,Uncategorized,1.2-alpha,,invalid,"middleware, decorator",,Unreviewed,0,0,0,0,0,0