Commit 9620f1b8b5f312c9e08edc93683804966d157a88
1 parent
c037de8a
Exists in
master
and in
11 other branches
Join using string.join
Showing
2 changed files
with
3 additions
and
4 deletions
Show diff stats
colab/accounts/views.py
@@ -279,7 +279,6 @@ def myaccount_redirect(request, route): | @@ -279,7 +279,6 @@ def myaccount_redirect(request, route): | ||
279 | if not request.user.is_authenticated(): | 279 | if not request.user.is_authenticated(): |
280 | raise Http404() | 280 | raise Http404() |
281 | 281 | ||
282 | - username = request.user.username | ||
283 | - url = "/account/" + username + "/" + route | 282 | + url = '/'.join(('/account', request.user.username, route)) |
284 | 283 | ||
285 | return redirect(url) | 284 | return redirect(url) |
colab/urls.py
@@ -28,8 +28,8 @@ urlpatterns = patterns( | @@ -28,8 +28,8 @@ urlpatterns = patterns( | ||
28 | # (same here) TODO: move to nginx | 28 | # (same here) TODO: move to nginx |
29 | url(r'^signup/', include('colab.accounts.urls')), | 29 | url(r'^signup/', include('colab.accounts.urls')), |
30 | url(r'^account/', include('colab.accounts.urls')), | 30 | url(r'^account/', include('colab.accounts.urls')), |
31 | - url(r'^myaccount/(?P<route>[\w@+.-/?]*)$', | ||
32 | - 'colab.accounts.views.myaccount_redirect',name='myaccount' ), | 31 | + url(r'^myaccount/(?P<route>.*)$', |
32 | + 'colab.accounts.views.myaccount_redirect', name='myaccount'), | ||
33 | 33 | ||
34 | url(r'', include('django_browserid.urls')), | 34 | url(r'', include('django_browserid.urls')), |
35 | 35 |