I have Url like /foo/bar
and Class based view has been defined as below.
class FooBar(View):
def handle_post_bar(self, request):
pass
def handle_get_bar(self, request):
pass
def handle_put_bar(self, request):
pass
In url i define as path('foo/bar/', FooBar.as_view())
Based on the http method and path i would like build view method names ex: handle_{0}_{1}'.format(method, path)
Please suggest me how to achive this, this should be common to all the urls and views.
i tried exploring the possibility of django middleware, but endedup in no luck.