def ng_delete(self, request, *args, **kwargs):
if '<STR_LIT>' not in request.GET:<EOL><INDENT>raise NgMissingParameterError("<STR_LIT>")<EOL><DEDENT>obj = self.get_object()<EOL>response = self.build_json_response(obj)<EOL>obj.delete()<EOL>return response<EOL>
Delete object and return it's data in JSON encoding
The response is build before the object is actually deleted
so that we can still retrieve a serialization in the response
even with a m2m relationship