मैं एक प्रलेखन ऐप के लिए कक्षा आधारित एपीआई बना रहा हूं, लेकिन मैं अपने APIView में पोस्ट और पैच परिभाषाओं के लिए विशिष्ट अनुमतियां जोड़ना चाहता हूं। उदाहरण के लिए,विशिष्ट अनुरोधों के लिए Django Rest Framework में अनुमतियां कैसे जोड़ें
class DocumentList(APIView):
def get(self,request,format=None):
... blah
def post(self,request,format=None):
only allow administrators to create new documents
... blah