parameters: (patterns, pre_fix, result)
return_statement: return result
docstring: 递归获取 django 所有路由
      :param patterns:
      :param pre_fix:
      :param result:
      :return:
docstring_summary: 递归获取 django 所有路由
      :param patterns:
      :param pre_fix:
      :param result:
      :return:
docstring_tokens: 递归获取 django 所有路由 : param patterns : : param pre_fix : : param result : : return :
function: def get_all_urls(patterns, pre_fix, result):
      """
      递归获取 django 所有路由
      :param patterns:
      :param pre_fix:
      :param result:
      :return:
      """
      for item in patterns:
          part = item.pattern.regex.pattern.strip("^$")
          if isinstance(item, URLPattern):
              result.append(pre_fix + part)
          else:
              get_all_urls(item.url_patterns, pre_fix + part, result=result)
      return result
function_tokens: def get_all_urls ( patterns , pre_fix , result ) : for item in patterns : part = item . pattern . regex . pattern . strip ( "^$" ) if isinstance ( item , URLPattern ) : result . append ( pre_fix + part ) else : get_all_urls ( item . url_patterns , pre_fix + part , result = result ) return result