Commit b41ed98a authored by Georgios D. Tsoukalas's avatar Georgios D. Tsoukalas
Browse files

snf-manage show_urls: fix empty view module crash

parent cf3f99b8
......@@ -53,7 +53,7 @@ class Command(BaseCommand):
for (func, regex) in view_functions:
func_name = hasattr(func, '__name__') and func.__name__ or repr(func)
views.append("%(url)s\t%(module)s.%(name)s" % {'name': style.MODULE_NAME(func_name),
'module': style.MODULE(func.__module__),
'module': style.MODULE(getattr(func, '__module__', '<no module>')),
'url': style.URL(simplify_regex(regex))})
return "\n".join([v for v in views])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment