def image_large(cls, model, request): try: if int(model.type_id) > 2: model.img = 'tile/tile_bg.png' img = model.img url = media_path(img,"large") return url except Exception, e: print e return ""
def image_middle(cls, model, request): try: if int(model.type_id) > 2: model.img = 'tile/tile_bg.png' img = model.img url = media_path(img,"big") attr = media_attr(img,"big"); data = {} if url: data.update({'url':url}) if attr: data.update({'width':attr['width'],'height':attr['height']}) return data except Exception, e: print e return ""