Ticket #1840: admindocdecoratorfix.diff

File admindocdecoratorfix.diff, 1.0 KB (added by dan.ferrante at gmail, 18 years ago)

SVN patch for this ticket that changes decorator code to report the decorated function to admin.doc views

  • contrib/admin/views/decorators.py

     
    105105            else:
    106106                return _display_login_form(request, ERROR_MESSAGE)
    107107
     108    _checklogin.__name__ = view_func.__name__
     109    _checklogin.__module__ = view_func.__module__
    108110    return _checklogin
  • contrib/auth/decorators.py

     
    1515            return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, quote(request.get_full_path())))
    1616        _checklogin.__doc__ = view_func.__doc__
    1717        _checklogin.__dict__ = view_func.__dict__
     18        _checklogin.__name__ = view_func.__name__
     19        _checklogin.__module__ = view_func.__module__
    1820
    1921        return _checklogin
    2022    return _dec
Back to Top