@classmethod<EOL><INDENT>def as_view(cls, *class_args, **class_kwargs):<DEDENT>
def view(*args, **kwargs):<EOL><INDENT>self = view.view_class(*class_args, **class_kwargs)<EOL>return self.dispatch_request(*args, **kwargs)<EOL><DEDENT>if cls.decorators:<EOL><INDENT>view.__module__ = cls.__module__<EOL>for decorator in cls.decorators:<EOL><INDENT>view = decorator(view)<EOL><DEDENT><DEDENT>view.view_class = cls<EOL>view.__doc__ = cls.__doc__<EOL>view.__module__ = cls.__module__<EOL>view.__name__ = cls.__name__<EOL>return view<EOL>
Return view function for use with the routing system, that
        dispatches request to appropriate handler method.