Revision 10157d43 snf-webproject/synnefo/webproject/management/commands/show_urls.py

b/snf-webproject/synnefo/webproject/management/commands/show_urls.py
53 53
            for (func, regex) in view_functions:
54 54
                func_name = hasattr(func, '__name__') and func.__name__ or repr(func)
55 55
                views.append("%(url)s\t%(module)s.%(name)s" % {'name': style.MODULE_NAME(func_name),
56
                                       'module': style.MODULE(func.__module__),
56
                                       'module': style.MODULE(getattr(func, '__module__', '<no module>')),
57 57
                                       'url': style.URL(simplify_regex(regex))})
58 58

  
59 59
        return "\n".join([v for v in views])

Also available in: Unified diff