Add a created_at_rss method to the blog Post model

master
Gergely Polonkai 9 years ago
parent 337e1eea2b
commit ed7a61207a

@ -21,6 +21,9 @@ class Post(models.Model):
super(Post, self).save(*args, **kwargs)
def created_at_rss(self):
return self.created_at.strftime('%a, %d %b %Y %T %z')
class CodeChunk(models.Model):
language = models.CharField(max_length = 20)
created_at = models.DateTimeField(auto_now_add = True)

Loading…
Cancel
Save