def get_header(klass): Comment = comments.get_model() content_type = ContentType.objects.get_for_model(Site) try: return util.mark_safe( Comment.objects.get(content_type=content_type, object_pk=settings.SITE_ID, flags__flag='site header').comment) except Comment.DoesNotExist: return None
def get_header(klass): Comment = comments.get_model() content_type = ContentType.objects.get_for_model(Site) try: return util.mark_safe(Comment.objects.get( content_type=content_type, object_pk=settings.SITE_ID, flags__flag='site header').comment) except Comment.DoesNotExist: return None
def thumb(self): url = self.thumb_url(97, 65) return util.mark_safe( '<img width="97" height="68" src="%s" alt="%s">' % ( url, self.name.replace('"', "'")))
def _thumb_html(self, width, height): thumb_url = self.thumb_url(width, height) return util.mark_safe( '<img class="hasCorners" src="%s" alt="%s">' % (thumb_url, cgi.escape(self.name)))
def thumb(self): url = self.thumb_url(97, 65) return util.mark_safe( '<img width="97" height="68" src="%s" alt="%s">' % (url, self.name.replace('"', "'")))
def _thumb_html(self, width, height): thumb_url = self.thumb_url(width, height) return util.mark_safe('<img class="hasCorners" src="%s" alt="%s">' % (thumb_url, cgi.escape(self.name)))