using postメソッドを作成できますが、テキストがすでにデータベースにMessageResource
ある場合は、「メッセージが存在します」のようなものを返したいです。MessageResource
それを実装する方法は?私MessageResource
は
class MessageResource(ModelResource):
class Meta:
queryset = Message.objects.all()
resource_name = "message"
always_return_data = True
authentication = Authentication()
authorization = Authorization()
filtering = {
'body': ALL
}
def determine_format(self, request):
return "application/json"