X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/2380185d894e5a62a20b91a0c5a3a48497fb3cfb..bf8e7237a705e2db952d94e7acde3b9f7a99ef91:/exceptions.py?ds=inline diff --git a/exceptions.py b/exceptions.py index b40f08a..f53083d 100644 --- a/exceptions.py +++ b/exceptions.py @@ -1,7 +1,19 @@ +from django.core.exceptions import ImproperlyConfigured + + +MIDDLEWARE_NOT_CONFIGURED = ImproperlyConfigured("""Philo requires the RequestNode middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'philo.middleware.RequestNodeMiddleware'.""") + + class ViewDoesNotProvideSubpaths(Exception): - """ Raised by get_subpath when the View does not provide subpaths (the default). """ + """ Raised by View.reverse when the View does not provide subpaths (the default). """ silent_variable_failure = True + class ViewCanNotProvideSubpath(Exception): - """ Raised by get_subpath when the View can not provide a subpath for the supplied object. """ - silent_variable_failure = True \ No newline at end of file + """ Raised by View.reverse when the View can not provide a subpath for the supplied arguments. """ + silent_variable_failure = True + + +class AncestorDoesNotExist(Exception): + """ Raised by get_path if the root model is not an ancestor of the current model """ + pass \ No newline at end of file