diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-05-07 20:05:28 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-05-07 20:05:28 -0500 |
commit | 9fa51f07af5981a7d119aa6b5ea52ea6bba600cf (patch) | |
tree | 585c68bc02645659d70aeb146608e3dca97ffef0 /mediagoblin/models.py | |
parent | 7a5ddb45dcf55c6d651b4a32dc1924e54b77c0f0 (diff) | |
parent | 8a6a81bcaa557f1d7ceebea8b372be7cc3423ca2 (diff) | |
download | mediagoblin-9fa51f07af5981a7d119aa6b5ea52ea6bba600cf.tar.lz mediagoblin-9fa51f07af5981a7d119aa6b5ea52ea6bba600cf.tar.xz mediagoblin-9fa51f07af5981a7d119aa6b5ea52ea6bba600cf.zip |
Merge remote branch 'refs/remotes/jwandborg/master'
Diffstat (limited to 'mediagoblin/models.py')
-rw-r--r-- | mediagoblin/models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/models.py b/mediagoblin/models.py index cd6a28cc..69b1f4f0 100644 --- a/mediagoblin/models.py +++ b/mediagoblin/models.py @@ -14,7 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import datetime +import datetime, uuid from mongokit import Document, Set @@ -41,6 +41,7 @@ class User(Document): 'pw_hash': unicode, 'email_verified': bool, 'status': unicode, + 'verification_key': unicode } required_fields = ['username', 'created', 'pw_hash', 'email'] @@ -48,8 +49,8 @@ class User(Document): default_values = { 'created': datetime.datetime.utcnow, 'email_verified': False, - # TODO: shouldn't be active by default, must have email registration - 'status': u'active'} + 'status': u'needs_email_verification', + 'verification_key': lambda: unicode( uuid.uuid4() ) } def check_login(self, password): """ |