mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Added documentation to the RedditAccount model, along with some inline tests
This commit is contained in:
@@ -7,6 +7,15 @@ from datetime import datetime
|
|||||||
class RedditAccount(models.Model):
|
class RedditAccount(models.Model):
|
||||||
"""
|
"""
|
||||||
Represents a User ID on Reddit
|
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)
|
user = models.ForeignKey(User, blank=True, null=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user