Esempio n. 1
0
 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}),
     }
Esempio n. 2
0
    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})

        }
Esempio n. 3
0
def thumbor_url(image_url, **kwargs):
    return thumb(image_url, **kwargs)
Esempio n. 4
0
 def image_url(self):
     return thumb(self.image, width=600, height=400, fit_in=True, unsafe=True)
Esempio n. 5
0
 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)