from pycs_api.views.base import JsonResponseView from django.views.decorators.http import require_POST class ProjectView(JsonResponseView): """ serves POST and GET for '/projects/' staticmethods serve POST methods for '/projects//name' '/projects//description' '/projects//remove' """ http_method_names = ["get", "post"] def get(self, request, *args, **kwargs): """ lists projects """ return self.respond() def post(self, request, *args, **kwargs): """ creates a project """ return self.respond() @require_POST @classmethod def remove(cls, request, project_id: int): """ removes a project """ return cls.respond() @require_POST @classmethod def edit_name(cls, request, project_id: int): """ edit project's name """ return cls.respond() @require_POST @classmethod def edit_description(cls, request, project_id: int): """ edit project's description """ return cls.respond() @require_POST @classmethod def run_external_storage(cls, request, project_id: int): """ runs external storage routine """ return cls.respond() @require_POST @classmethod def run_label_provider(cls, request, project_id: int): """ runs label provider routine """ return cls.respond()