Small bits of documentation for the Reddit app

This commit is contained in:
2010-08-07 12:32:58 +01:00
parent 72fc1c9635
commit 9718800002
2 changed files with 4 additions and 0 deletions

View File

@@ -48,6 +48,8 @@ class RedditAccount(models.Model):
self.last_update = datetime.now()
def recent_posts(self):
""" Returns the first page of posts visible on the user's profile page """
try:
jsondoc = json.load(urllib.urlopen("http://reddit.com/user/%s.json" % self.username))
except: