Exemplo n.º 1
0
	def admin_thumb(self):
		im = get_thumbnail(self.file.file, "100x100", quality=85)
		return '<img src="%s" alt="" style="margin: %s" />' % (im.url, sorl_margin(im, "100x100"))
Exemplo n.º 2
0
def margin(file_, geom_string):
    if IS_ENABLED and geom_string in helpers.get_named_sizes():
        geom_string = helpers.clean_geom(helpers.get_geom_string(geom_string))
    return sorl_margin(file_, geom_string)