def setup_view(view, request, *args, **kwargs):
 view.request = request
 view.args = args
 view.kwargs = kwargs
 return view

def setup_view ( view , request , * args , ** kwargs ) : view . request = request view . args = args view . kwargs = kwargs return view
mimic as_view() returned callable .