allow customization the names of the get(),post(),put() etc methods of a django.views.generic.base.View derived class
|Reported by:||Owned by:||nobody|
|Severity:||Normal||Keywords:||generic view method|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
It would be useful to not force the usage of 'get', 'post', 'delete', 'put' and so on as the Python method name of a django.views.generic.base.View derived class. For example, what if i want to implement in the derived class a 'delete' method that is not the HTTP delete servicing request method, and instead call the delete servicing method as "DELETE"? The provided patch allow a View derived class to implement the get_method_name_of_http_method() that normally returns the lower case version of the HTTP method name, but it could be overridden in the derived class to customize the HTTP servicing Python method name, like for example if in the derived class we return the HTTP method name uppercased, then the servicing method of the class are named 'GET', 'POST' and so on.