﻿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
21564	Generic base view http_method_not_allowed method references self.request and should use locally scoped request	Adam DePue	nobody	"The current method in django/views/generic/base.py is:
     def http_method_not_allowed(self, request, *args, **kwargs):                         
         logger.warning('Method Not Allowed (%s): %s', request.method, request.path,      
             extra={                                                                      
                 'status_code': 405,                                                      
                 'request': self.request                                                  
             }                                                                            
         )                                                                                
         return http.HttpResponseNotAllowed(self._allowed_methods())                      

The 'extra' dictionary should reference the locally scoped 'request' object instead of the class scoped member.

There is a PR open with this fix:
https://github.com/django/django/pull/2035


The side effect is that any unit test written that uses the view and manually calls the dispatch method to validate non-allowed-methods will crash with  attribute not found error for request"	Uncategorized	new	Generic views	1.6	Normal				Unreviewed	0	0	0	0	0	0
