flake8 cleanups, ununsed imports and variables cleanup, changed register_diagnostics to use reverse_lazy instead of reverse
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.functional import lazy
|
||||
from django.utils.functional import lazy
|
||||
|
||||
diagnostics = {}
|
||||
tools = {}
|
||||
@@ -9,7 +9,7 @@ reverse_lazy = lazy(reverse, str)
|
||||
def register_diagnostic(namespace, title, link):
|
||||
namespace_dict = diagnostics.get(namespace, {'title': None, 'links': []})
|
||||
namespace_dict['title'] = title
|
||||
link['url'] = link.get('url', reverse(link['view']))
|
||||
link['url'] = link.get('url', reverse_lazy(link['view']))
|
||||
namespace_dict['links'].append(link)
|
||||
diagnostics[namespace] = namespace_dict
|
||||
|
||||
|
||||
Reference in New Issue
Block a user