From 64b4d736174163cdaefbdd91c8c9f16b355a630e Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Mon, 10 May 2010 14:06:30 +0100 Subject: [PATCH] Added documentation to the RedditAccount model, along with some inline tests --- reddit/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reddit/models.py b/reddit/models.py index 98838aa..c28a243 100644 --- a/reddit/models.py +++ b/reddit/models.py @@ -7,6 +7,15 @@ from datetime import datetime class RedditAccount(models.Model): """ Represents a User ID on Reddit + + This model can be populated by API update: + + >>> from reddit.models import RedditAccount + >>> mod = RedditAccount() + >>> mod.username = 'nik_doof' + >>> mod.api_update() + >>> mod.reddit_id + '1axok' """ user = models.ForeignKey(User, blank=True, null=True)