def get_json_context(self): return { "name": self.pretty_name, "imdb_rating": self.pretty_imdb, "image": thumb(self.movie.image), "description": render_to_string("contexts/movie_popover.html", {"movie": self.movie}), }
def get_json_context(self): return { 'name': self.pretty_name, 'imdb_rating': self.pretty_imdb, 'image': thumb(self.movie.image), 'description': render_to_string('contexts/movie_popover.html', {'movie': self.movie}) }
def thumbor_url(image_url, **kwargs): return thumb(image_url, **kwargs)
def image_url(self): return thumb(self.image, width=600, height=400, fit_in=True, unsafe=True)
def user_icon_url(self): path = '{}img/user/{}.jpg'.format( settings.MEDIA_URL, self.user.username) return thumb(path, width=50, height=50, unsafe=True)