Ensure the request HTTP method is permitted for this resource.

        Raising a ResourceException if it is not.

def check_method_allowed(cls, request):
        """ Ensure the request HTTP method is permitted for this resource.

        Raising a ResourceException if it is not.

        """
        if not request.method in cls._meta.allowed_methods:
            raise HttpError(
                'Method \'%s\' not allowed on this resource.' % request.method,
                status=status.HTTP_405_METHOD_NOT_ALLOWED)