def d(request, *args, **kwargs):
    handler = table.get(request.method, invalid_method)
return handler(request, *args, **kwargs)
return d
how to discriminate based on HTTP method in django urlpatterns