djapiauth/utility.py
def traverse_urls(urlpattern, prefixre=[], prefixname=[], patternFunc=None, resolverFunc=None):
    """
    urlpattern: urlpattern object

    prefix?? : for multiple level urls defined in different urls.py files
    prefixre: compiled regex object
    prefixnames: regex text

    patternFunc: function to process RegexURLPattern
    resolverFunc: function to process RegexURLResolver
    """
    for u in urlpattern:
        if isinstance(u, RegexURLResolver):  # inspect sub urls
            if resolverFunc:
                resolverFunc(u, prefixre, prefixname)

            traverse_urls(u.url_patterns,
                          prefixre + [u.regex, ],
                          prefixname + [u._regex, ],
                          patternFunc,
                          resolverFunc)
        else:
            if patternFunc:
                patternFunc(u, prefixre, prefixname)
def traverse_urls(urlpattern, prefixre=[], prefixname=[], patternFunc=None, resolverFunc=None):
    """
    urlpattern: urlpattern object

    prefix?? : for multiple level urls defined in different urls.py files
    prefixre: compiled regex object
    prefixnames: regex text

    patternFunc: function to process RegexURLPattern
    resolverFunc: function to process RegexURLResolver
    """
    for u in urlpattern:
        if isinstance(u, RegexURLResolver):  # inspect sub urls
            if resolverFunc:
                resolverFunc(u, prefixre, prefixname)

            traverse_urls(u.url_patterns,
                          prefixre + [u.regex, ],
                          prefixname + [u._regex, ],
                          patternFunc,
                          resolverFunc)
        else:
            if patternFunc:
                patternFunc(u, prefixre, prefixname)
def traverse_urls ( urlpattern , prefixre = [ ] , prefixname = [ ] , patternFunc = None , resolverFunc = None ) : for u in urlpattern : if isinstance ( u , RegexURLResolver ) : # inspect sub urls if resolverFunc : resolverFunc ( u , prefixre , prefixname ) traverse_urls ( u . url_patterns , prefixre + [ u . regex , ] , prefixname + [ u . _regex , ] , patternFunc , resolverFunc ) else : if patternFunc : patternFunc ( u , prefixre , prefixname )
urlpattern: urlpattern object

    prefix?? : for multiple level urls defined in different urls.py files
    prefixre: compiled regex object
    prefixnames: regex text

    patternFunc: function to process RegexURLPattern
    resolverFunc: function to process RegexURLResolver
urlpattern : urlpattern object