diff options
| author | Emanuele Pucciarelli | 2014-04-29 21:41:53 +0200 |
|---|---|---|
| committer | Emanuele Pucciarelli | 2014-04-29 21:41:53 +0200 |
| commit | f54399ea778cd58a0eec111ef9380a7867a7d030 (patch) | |
| tree | 079623cedf694588b6c57769aef808e49395798f /rest_framework/exceptions.py | |
| parent | 8904f179d1bc925d52001497e92b9cd509e65bd5 (diff) | |
| parent | 161270da992c13ff093048429d3d139f9bd0fc4e (diff) | |
| download | django-rest-framework-f54399ea778cd58a0eec111ef9380a7867a7d030.tar.bz2 | |
Merge remote-tracking branch 'upstream/master'
Conflicts:
rest_framework/tests/models.py
Diffstat (limited to 'rest_framework/exceptions.py')
| -rw-r--r-- | rest_framework/exceptions.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index 0ac5866e..5f774a9f 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -20,6 +20,8 @@ class APIException(Exception): def __init__(self, detail=None): self.detail = detail or self.default_detail + def __str__(self): + return self.detail class ParseError(APIException): status_code = status.HTTP_400_BAD_REQUEST |
