Fixed diagnostics url resolution
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
|
from django.core.urlresolvers import reverse
|
||||||
|
|
||||||
diagnostics = {}
|
diagnostics = {}
|
||||||
|
|
||||||
|
|
||||||
def register_diagnostic(namespace, title, link):
|
def register_diagnostic(namespace, title, link):
|
||||||
namespace_dict = diagnostics.get(namespace, {'title': None, 'links': []})
|
namespace_dict = diagnostics.get(namespace, {'title': None, 'links': []})
|
||||||
namespace_dict['title'] = title
|
namespace_dict['title'] = title
|
||||||
|
link['url'] = link.get('url', reverse(link['view']))
|
||||||
namespace_dict['links'].append(link)
|
namespace_dict['links'].append(link)
|
||||||
diagnostics[namespace] = namespace_dict
|
diagnostics[namespace] = namespace_dict
|
||||||
|
|||||||
Reference in New Issue
Block a user