Fix doc for custom exception sample

The way to provide a default detail for APIException is to define a `default_detail` attribute on the subclass.

Defining a `detail` attribute without `default_detail` will not work, and will result in empty detail instead.
This commit is contained in:
Paul Melnikow 2014-01-31 12:26:45 -05:00
parent 2921455ea7
commit 77ced39e6c

View File

@ -94,7 +94,7 @@ For example, if your API relies on a third party service that may sometimes be u
class ServiceUnavailable(APIException):
status_code = 503
detail = 'Service temporarily unavailable, try again later.'
default_detail = 'Service temporarily unavailable, try again later.'
## ParseError