In my django-piston handler functions, it looks like I can basically do two things. Either I can return a specific status code with some non-formatted content:
def create(...):
...
resp = rc.BAD_REQUEST
resp.content = 'Some string error message'
return resp
Or I can return a dictionary of error messsages, which can be formatted according to the specified emitter, but with a 200 status code:
def create(...):
...
return error_dict
How can I return a dictionary or model object, formatted by the specified emitter, but with a customized status code?