Added documentation to the RedditAccount model, along with some inline tests

This commit is contained in:
2010-05-10 14:06:30 +01:00
parent 6ae35f8775
commit 64b4d73617

View File

@@ -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)