mirror of
https://github.com/jazzband/django-authority.git
synced 2026-04-30 03:34:43 +00:00
13 lines
390 B
Python
13 lines
390 B
Python
|
|
class AuthorityException(Exception):
|
||
|
|
pass
|
||
|
|
|
||
|
|
class NotAModel(AuthorityException):
|
||
|
|
def __init__(self, object):
|
||
|
|
super(NotAModel, self).__init__(
|
||
|
|
"Not a model class or instance")
|
||
|
|
|
||
|
|
class UnsavedModelInstance(AuthorityException):
|
||
|
|
def __init__(self, object):
|
||
|
|
super(UnsavedModelInstance, self).__init__(
|
||
|
|
"Model instance has no pk, was it saved?")
|