code: def method_as_view(cls, method_name, *class_args, **class_kwargs):
          
          if method_name not in cls._view_funcs:
              def view_func(*args, **kwargs):
                  self = view_func.view_class(*class_args, **class_kwargs)
                  return self.dispatch_request(method_name, *args, **kwargs)
  
              wrapper_assignments = (set(functools.WRAPPER_ASSIGNMENTS)
                                     .difference({'__qualname__'}))
              functools.update_wrapper(view_func, getattr(cls, method_name),
                                       assigned=list(wrapper_assignments))
              view_func.view_class = cls
              cls._view_funcs[method_name] = view_func
  
          return cls._view_funcs[method_name]
docs: this code, combined with apply_decorators and dispatch_request, is
          95% taken from Flask's View.as_view classmethod (albeit refactored)
          differences:
  
          - we pass method_name to dispatch_request, to allow for easier
            customization of behavior by subclasses
          - we apply decorators later, so they get called when the view does
  
          FIXME: maybe this last bullet point is a horrible idea???
          - we also apply them in reverse, so that they get applied in the
            logical top-to-bottom order as declared in controllers