Commits

Gregory Petukhov committed 3c543d9

Add Post.summary_uncached method

Comments (0)

Files changed (2)

feedzilla/models.py

 from django.db import models
 from django.core.urlresolvers import reverse
 from django.utils.translation import ugettext_lazy as _
+from django.conf import settings
 
+from feedzilla.util.clean import safe_html
 from tagging.fields import TagField
 
 class Feed(models.Model):
         #return reverse('feedzilla_post', args=[self.id])
         return self.link
 
+    def summary_uncached(self):
+        return safe_html(self.content[:settings.FEEDZILLA_SUMMARY_SIZE])
+
 
 class FilterTag(models.Model):
     value = models.CharField(_('Value'), max_length=255, unique=True)
+#!/bin/sh
+hg push
+python setup.py register sdist upload # build_sphinx upload_sphinx