|
@ -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 '' |
|
|
|
|
|
|
|
|