Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add author field to models.Post

  • Loading branch information...
commit f8e3e5f648d253dd695cce563c179159490e4b59 1 parent 6b1ab12
@mattoufoutu authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  apps/feeds/models.py
  2. +1 −1  lib/helpers.py
View
2  apps/feeds/models.py
@@ -22,7 +22,7 @@ def __unicode__(self):
class Post(models.Model):
feed = models.ForeignKey(Feed, to_field='title')
- author = models.CharField(max_length=50)
+ author = models.CharField(max_length=50, default='Unknown')
link = models.URLField(unique=True, verify_exists=False)
title = models.CharField(max_length=150)
summary = models.TextField(unique=True)
View
2  lib/helpers.py
@@ -36,7 +36,7 @@ def update_feed(feed):
pubdate = datetime.fromtimestamp(mktime(pubdate))
post = Post(
feed=feed,
- author=feed.get('author', 'Unknown'),
+ author=feed.get('author', None),
link=entry.link,
title=entry.title,
summary=entry.summary,
Please sign in to comment.
Something went wrong with that request. Please try again.