diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2013-01-07 16:18:45 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2013-01-09 09:56:53 +0100 |
commit | abc4da2927be02fb21d2f2bd1effea7b5ee6b9c7 (patch) | |
tree | 8441d5f29c21bdf880b46727680c91c5f2183aa1 /mediagoblin/templates | |
parent | 6de8b42e4ed1f1cd663501d5f61032ba41ed0285 (diff) | |
download | mediagoblin-abc4da2927be02fb21d2f2bd1effea7b5ee6b9c7.tar.lz mediagoblin-abc4da2927be02fb21d2f2bd1effea7b5ee6b9c7.tar.xz mediagoblin-abc4da2927be02fb21d2f2bd1effea7b5ee6b9c7.zip |
Enable /u/USERNAME/edit/ pattern #588
Transition from the inconsistent /edit/profile/?username=FOO to
the nicer /u/FOO/edit/. The old pattern will still work and
redirects to the new URL.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r-- | mediagoblin/templates/mediagoblin/edit/edit_profile.html | 5 | ||||
-rw-r--r-- | mediagoblin/templates/mediagoblin/user_pages/user.html | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html index 2b2fa4fa..163fe186 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_profile.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html @@ -27,9 +27,8 @@ {% block mediagoblin_content %} - <form action="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{ - user.username }}" - method="POST" enctype="multipart/form-data"> + <form action="{{ request.urlgen('mediagoblin.edit.profile', + user=user.username) }}" method="POST" enctype="multipart/form-data"> <div class="form_box edit_box"> <h1> {%- trans username=user.username -%} diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index 65c636b9..76bce1e2 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -95,9 +95,8 @@ <p> {% trans %}Here's a spot to tell others about yourself.{% endtrans %} </p> - <a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{ - user.username }}" - class="button_action"> + <a href="{{ request.urlgen('mediagoblin.edit.profile', + user=user.username) }}" class="button_action"> {%- trans %}Edit profile{% endtrans -%} </a> {% else %} @@ -113,8 +112,8 @@ {% include "mediagoblin/utils/profile.html" %} {% if request.user and (request.user.id == user.id or request.user.is_admin) %} - <a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{ - user.username }}"> + <a href="{{ request.urlgen('mediagoblin.edit.profile', + user=user.username) }}"> {%- trans %}Edit profile{% endtrans -%} </a> {% endif %} |