aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-05-31 19:17:28 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-05-31 19:17:28 -0500
commitd9951a6e03686e41479b83bc022eb97945efeca9 (patch)
tree4641261de1e623650e8f4b784708c197240a70b3 /mediagoblin/db/models.py
parentb1ae76aea0141354b479e1c0451bc003e9b6e248 (diff)
parentb93a6a229e1c7a7eef76e8322104912378f79a96 (diff)
downloadmediagoblin-d9951a6e03686e41479b83bc022eb97945efeca9.tar.lz
mediagoblin-d9951a6e03686e41479b83bc022eb97945efeca9.tar.xz
mediagoblin-d9951a6e03686e41479b83bc022eb97945efeca9.zip
Merge remote branch 'remotes/aleks/aleks'
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r--mediagoblin/db/models.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index 3da97a49..0b85430a 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -64,6 +64,14 @@ class User(Document):
return auth_lib.bcrypt_check_password(
password, self['pw_hash'])
+ def generate_new_verification_key(self):
+ """
+ Create a new verification key, overwriting the old one.
+ """
+
+ self['verification_key'] = unicode(uuid.uuid4())
+ self.save(validate=False)
+
class MediaEntry(Document):
__collection__ = 'media_entries'