Commit 31c12deeed7cebe905bb92aa2c76a1bfa11f220f
1 parent
34850b9a
Exists in
master
and in
39 other branches
New Noosfero profile redirect
Showing
2 changed files
with
3 additions
and
14 deletions
Show diff stats
colab/proxy/noosfero/apps.py
| ... | ... | @@ -15,9 +15,7 @@ class ProxyNoosferoAppConfig(ColabProxiedAppConfig): |
| 15 | 15 | (_('Communities'), 'search/communities'), |
| 16 | 16 | ), |
| 17 | 17 | 'auth_links': ( |
| 18 | - (_('Profile'), 'profile/{0}'), | |
| 19 | - (_('Control panel'), 'myprofile/{0}'), | |
| 18 | + (_('Profile'), 'profile/~/'), | |
| 19 | + (_('Control panel'), 'myprofile/~/'), | |
| 20 | 20 | ), |
| 21 | 21 | } |
| 22 | - | |
| 23 | - arguments = ["context['user']"] | ... | ... |
colab/proxy/templatetags/proxy.py
| ... | ... | @@ -37,17 +37,8 @@ def proxy_menu(context): |
| 37 | 37 | if title not in menu_links: |
| 38 | 38 | menu_links[title] = [] |
| 39 | 39 | |
| 40 | - is_authenticated = context['request'].user.is_authenticated() | |
| 41 | - if hasattr(app, 'arguments') and is_authenticated: | |
| 42 | - arguments = app.arguments | |
| 43 | - else: | |
| 44 | - arguments = [] | |
| 45 | - | |
| 46 | - for i, _ in enumerate(arguments): | |
| 47 | - arguments[i] = eval(arguments[i]) | |
| 48 | - | |
| 49 | 40 | for text, link in links: |
| 50 | - url = reverse(app.label, args=(link.format(*arguments),)) | |
| 41 | + url = reverse(app.label, args=(link,)) | |
| 51 | 42 | menu_links[title].append((text, url)) |
| 52 | 43 | |
| 53 | 44 | menu = render_to_string('proxy/menu_template.html', | ... | ... |