From 279d925e757d9756e09e14316f0d85b6e20624ea Mon Sep 17 00:00:00 2001 From: cfdv Date: Sat, 18 Jun 2011 15:00:05 -0500 Subject: adds user bio and website url fields to the database --- mediagoblin/db/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mediagoblin/db/models.py') diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index d77cf619..4b6518cc 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -46,6 +46,8 @@ class User(Document): 'status': unicode, 'verification_key': unicode, 'is_admin': bool, + 'website_url' : unicode, + 'bio' : unicode } required_fields = ['username', 'created', 'pw_hash', 'email'] -- cgit v1.2.3 From 630b57a366d10495a89d392c9b02cf432e6a1599 Mon Sep 17 00:00:00 2001 From: cfdv Date: Sat, 18 Jun 2011 16:42:22 -0500 Subject: baby step towards enabling profile edits adds * url and bio fields to database * form for editing the user profile * route to the edit profile controller * view for the profile editing page * template for the profile editing page * link to edit profile in the welcome page still needs * thorough inspection to see if it makes sense * tests * ? --- mediagoblin/db/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mediagoblin/db/models.py') diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 4b6518cc..78bec979 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -46,7 +46,7 @@ class User(Document): 'status': unicode, 'verification_key': unicode, 'is_admin': bool, - 'website_url' : unicode, + 'url' : unicode, 'bio' : unicode } -- cgit v1.2.3 From 0472653ee4763e2f045632d49a9eed729a491f97 Mon Sep 17 00:00:00 2001 From: cfdv Date: Mon, 20 Jun 2011 22:47:43 -0500 Subject: assigns migration steps to User database objects adds the migration_handler to the User db class, connecting the migration steps in ../db/migrations.py to the migration code in gmg_commands --- mediagoblin/db/models.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mediagoblin/db/models.py') diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index b3de7793..600b79ff 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -58,6 +58,8 @@ class User(Document): 'status': u'needs_email_verification', 'verification_key': lambda: unicode(uuid.uuid4()), 'is_admin': False} + + migration_handler = migrations.UserMigration def check_login(self, password): """ -- cgit v1.2.3