def photo_img(self): im = ImageManager() if self.photo: return Markup('<a href="' + url_for('ProductPubView.show', pk=str(self.id)) + '" class="thumbnail"><img src="' + im.get_url(self.photo) + '" alt="Photo" class="img-rounded img-responsive"></a>') else: return Markup('<a href="' + url_for('ProductPubView.show', pk=str(self.id)) + '" class="thumbnail"><img src="//:0" alt="Photo" class="img-responsive"></a>')
def photo_img(self): im = ImageManager() if self.photo: return Markup( '<a href="/persons/show/' + str(self.id) + '" class="thumbnail"><img src="' + im.get_url(self.photo) + '" alt="Photo" class="img-rounded img-responsive"></a>' ) else: return Markup( '<a href="/persons/show/' + str(self.id) + '" class="thumbnail"><img src="//:0" alt="Photo" class="img-responsive"></a>' )