Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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