def METHOD_NAME(cls):
    super().METHOD_NAME()
    # special case @api_view: view class is nested in the cls attr of the function object
    if hasattr(cls.target_class, 'cls'):
        cls.target_class = cls.target_class.cls