classAPIView(View):...@propertydefallowed_methods(self):"""
Wrap Django's private `_allowed_methods` interface in a public property.
"""returnself._allowed_methods()
classView:"""
Intentionally simple parent class for all views. Only implements
dispatch-by-method and simple sanity checking.
"""http_method_names=["get","post","put","patch","delete","head","options","trace",]