diff options
author | Jakob Kramer <jakob.kramer@gmx.de> | 2011-05-29 19:49:25 +0200 |
---|---|---|
committer | Jakob Kramer <jakob.kramer@gmx.de> | 2011-05-29 19:49:25 +0200 |
commit | db5912e358043c90194c6409fa09ab07d16df4c3 (patch) | |
tree | 28d51243607204ba08c96a61b74fc10655ab32a9 | |
parent | ff6b9f7279d7ee2efceae933da43f4a9b6459465 (diff) | |
download | mediagoblin-db5912e358043c90194c6409fa09ab07d16df4c3.tar.lz mediagoblin-db5912e358043c90194c6409fa09ab07d16df4c3.tar.xz mediagoblin-db5912e358043c90194c6409fa09ab07d16df4c3.zip |
remove all 'username_repr' stuff
-rw-r--r-- | mediagoblin/auth/views.py | 3 | ||||
-rw-r--r-- | mediagoblin/db/models.py | 3 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/base.html | 2 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/user.html | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index cf71be77..6b5ce88c 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -44,7 +44,6 @@ def register(request): # Create the user entry = request.db.User() entry['username'] = request.POST['username'].lower() - entry['username_repr'] = request.POST['username'] entry['email'] = request.POST['email'] entry['pw_hash'] = auth_lib.bcrypt_gen_password_hash( request.POST['password']) @@ -64,7 +63,7 @@ def register(request): # example "GNU MediaGoblin @ Wandborg - [...]". 'GNU MediaGoblin - Verify email', email_template.render( - username=entry['username_repr'], + username=entry['username'], verification_url='http://{host}{uri}?userid={userid}&token={verification_key}'.format( host=request.host, uri=request.urlgen('mediagoblin.auth.verify_email'), diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 0b4390d7..37420834 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -38,7 +38,6 @@ class User(Document): structure = { 'username': unicode, - 'username_repr': unicode, 'email': unicode, 'created': datetime.datetime, 'plugin_data': dict, # plugins can dump stuff here. @@ -49,7 +48,7 @@ class User(Document): 'is_admin': bool, } - required_fields = ['username', 'username_repr', 'created', 'pw_hash', 'email'] + required_fields = ['username', 'created', 'pw_hash', 'email'] default_values = { 'created': datetime.datetime.utcnow, diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index df803196..704e5aa7 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -34,7 +34,7 @@ {% endblock %}{% block mediagoblin_header_title %}{% endblock %} <div class="mediagoblin_header_right"> {% if request.user %} - {{ request.user['username_repr'] }}'s account + {{ request.user['username'] }}'s account (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">logout</a>) {% else %} <a href="{{ request.urlgen('mediagoblin.auth.login') }}"> diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index b9c98568..2d09f685 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -26,7 +26,7 @@ {% block mediagoblin_content -%} {% if user %} - <h1>User page for '{{ user.username_repr }}'</h1> + <h1>User page for '{{ user.username }}'</h1> <ul> |