Browse Source

Reverte alter em menus.py por imcompatibilidades

pull/701/head
LeandroRoberto 8 years ago
parent
commit
c4242e8e9b
  1. 10
      sapl/base/templatetags/menus.py

10
sapl/base/templatetags/menus.py

@ -29,6 +29,7 @@ def subnav(context, path=None):
if obj: if obj:
root_pk = obj.pk root_pk = obj.pk
if root_pk:
request = context['request'] request = context['request']
""" """
@ -88,13 +89,8 @@ def resolve_urls_inplace(menu, pk, rm, context):
menu['url'] = '' menu['url'] = ''
menu['active'] = '' menu['active'] = ''
else: else:
try: menu['url'] = reverse(
menu['url'] = reverse('%s:%s' % ( '%s:%s' % (rm.app_name, menu['url']), kwargs={'pk': pk})
rm.app_name, menu['url']),
kwargs={'pk': pk})
except:
menu['url'] = reverse('%s:%s' % (rm.app_name, menu['url']))
menu['active'] = 'active'\ menu['active'] = 'active'\
if context['request'].path == menu['url'] else '' if context['request'].path == menu['url'] else ''

Loading…
Cancel
Save