Authenticates the request and dispatches to the correct HTTP method
        function (GET, POST, PUT,...).

        Translates exceptions into proper JSON serialized HTTP responses:
            - ValidationError: HTTP 409
            - Http404: HTTP 404
            - PermissionDenied: HTTP 403
            - ValueError: HTTP 400

def dispatch(self, *args, **kwargs):
        """
        Authenticates the request and dispatches to the correct HTTP method
        function (GET, POST, PUT,...).

        Translates exceptions into proper JSON serialized HTTP responses:
            - ValidationError: HTTP 409
            - Http404: HTTP 404
            - PermissionDenied: HTTP 403
            - ValueError: HTTP 400
        """
        try:
            self.auth(*args, **kwargs)
            return super(RestView, self).dispatch(*args, **kwargs)
        except ValidationError as e:
            return self.render_to_response(e.message_dict, status=409)
        except Http404 as e:
            return self.render_to_response(str(e), status=404)
        except PermissionDenied as e:
            return self.render_to_response(str(e), status=403)
        except ValueError as e:
            return self.render_to_response(str(e), status=400)