APIを作成しました。リソースを取得すると、次のようになります。
{
category: {
id: "517ed1bff929f90e1152ad43",
name: "Test category"
},
cost: "Free",
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras tincidunt augue in mi scelerisque quis condimentum velit sollicitudin. Nam eleifend posuere semper. Pellentesque non nulla et arcu ornare lacinia. Donec quis dui at velit placerat volutpat vitae sit amet lorem. ",
genders: [
"M",
"F"
],
id: "517ed1bff929f90e1152ad44",
tags: [
{
id: "517ed1bff929f90e1152ad3f",
name: "testing",
resource_uri: "/api/v1/interests/517ed1bff929f90e1152ad3f/"
},
{
id: "517ed1bff929f90e1152ad41",
name: "coding",
resource_uri: "/api/v1/interests/517ed1bff929f90e1152ad41/"
}
],
location: {
lat_lng: [
51.500705,
-0.124575
],
locality: "London",
name: "Big Ben"
},
resource_uri: "/api/v1/events/517ed1bff929f90e1152ad44/",
slug: "test-event1",
title: "Test event1"
}
オブジェクトの送信を要求するのではなく、['testing', 'coding', 'python'] などのタグをリストとして送信できるようにしたい - これは、タグ オブジェクトが存在しない場合は作成するためです。
Tastypie でこれを行うにはどうすればよいですか?REST の原則に違反していますか?