Luke Plant avatar Luke Plant committed 11902ca

Corrected 'name' of functions wrapped with method_decorator

Comments (0)

Files changed (1)

django/utils/decorators.py

         return wraps(func)(_wrapper)
     update_wrapper(_dec, decorator)
     # Change the name to aid debugging.
-    _dec.__name__ = 'method_dec(%s)' % decorator.__name__
+    _dec.__name__ = 'method_decorator(%s)' % decorator.__name__
     return _dec
 
 
     """
     return make_middleware_decorator(middleware_class)()
 
+
 def available_attrs(fn):
     """
     Return the list of functools-wrappable attributes on a callable.
     """
     return tuple(a for a in WRAPPER_ASSIGNMENTS if hasattr(fn, a))
 
+
 def make_middleware_decorator(middleware_class):
     def _make_decorator(*m_args, **m_kwargs):
         middleware = middleware_class(*m_args, **m_kwargs)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.