예제 #1
0
 def to_json_search_result(self):
     data = self.to_json
     data['detail_href'] = get_absolute_url('images_api.images_detail',
                                            image_id=self.id)
     data['genre'] = self.artist.genre
     return data
예제 #2
0
 def to_json_with_detail(self):
     data = self.to_json
     data['detail_href'] = get_absolute_url('images_api.images_detail',
                                            image_id=self.id)
     return data
예제 #3
0
 def to_json_with_artist(self):
     data = self.to_json
     data['artist_href'] = get_absolute_url('artists_api.artists_detail',
                                            artist_id=self.artist.id)
     return data
예제 #4
0
 def to_json_search_result(self):
     data = self.to_json
     data['detail_href'] = get_absolute_url('images_api.images_detail', image_id=self.id)
     data['genre'] = self.artist.genre
     return data
예제 #5
0
 def to_json_with_artist(self):
     data = self.to_json
     data['artist_href'] = get_absolute_url('artists_api.artists_detail', artist_id=self.artist.id)
     return data
예제 #6
0
 def to_json_with_detail(self):
     data = self.to_json
     data['detail_href'] = get_absolute_url('images_api.images_detail', image_id=self.id)
     return data
예제 #7
0
 def to_json_with_artworks(self):
     data = self.to_json
     data['artworks_href'] = get_absolute_url('artists_api.artists_artworks', artist_id=self.id)
     return data