﻿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
32468	Admin never_cache decorators needs method_decorator	hakib	hakib	"The login and logout views in Django's admin site are using the `never_cache` decorator, but they are both instance methods, so they need to use the method_decorator.

This is not a bug because the `never_cache` decorator is only operating on the response. The first argument to the decorator is supposed to be the request, but it is in-fact the admin_site instance (`self`). All the arguments are then passed to the view function and the decorator operate on the response.

If you try to use a different decorator that uses the request (such as `required_http_methods`) you will fail. 

    AttributeError: 'CustomAdminSite' object has no attribute 'method'

Related issue from long time ago:

https://code.djangoproject.com/ticket/18923"	Bug	closed	contrib.admin	3.1	Normal	fixed	admin		Ready for checkin	1	0	0	0	1	0
