Skip to content

Instantly share code, notes, and snippets.

@dedy-purwanto
Created April 24, 2014 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dedy-purwanto/11248597 to your computer and use it in GitHub Desktop.
Save dedy-purwanto/11248597 to your computer and use it in GitHub Desktop.
class BananaModelSerializer(object):
@property
def errors(self):
err = super(BananaModelSerializer, self).errors
if err:
new_err = dict( detail='validation error', code='validation-error', errors=err,)
return new_err
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment