Author: lukeplant Date: 2010-05-13 06:11:27 -0500 (Thu, 13 May 2010) New Revision: 13249
Modified: django/trunk/django/utils/decorators.py Log: Corrected 'name' of functions wrapped with method_decorator Modified: django/trunk/django/utils/decorators.py =================================================================== --- django/trunk/django/utils/decorators.py 2010-05-12 23:00:57 UTC (rev 13248) +++ django/trunk/django/utils/decorators.py 2010-05-13 11:11:27 UTC (rev 13249) @@ -22,7 +22,7 @@ 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 @@ -50,6 +50,7 @@ """ return make_middleware_decorator(middleware_class)() + def available_attrs(fn): """ Return the list of functools-wrappable attributes on a callable. @@ -57,6 +58,7 @@ """ 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) -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.