def urls(conf): if hasattr(conf, '_urls_cache'): return conf._urls_cache new_urlpatterns = [] for pattern in urlpatterns: # Call to recursively apply the conf and bases to each of the # views referenced in the urlconf. new_urlpatterns.append(self.add_conf_to_pattern(pattern, self.conf, bases)) conf._urls_cache = urlconf_include(new_urlpatterns, app_name=self.application_name.split('.')[-1], namespace=self.local_name) return conf._urls_cache
def urls(conf): if hasattr(conf, '_urls_cache'): return conf._urls_cache # Load the urls module and extract the patterns urlpatterns = import_module(self.urlconf).urlpatterns new_urlpatterns = [] for pattern in urlpatterns: # Call to recursively apply the conf and bases to each of the # views referenced in the urlconf. new_urlpatterns.append(self.add_conf_to_pattern(pattern, self.conf, bases)) conf._urls_cache = urlconf_include(new_urlpatterns, self.application_name.split('.')[-1], self.local_name) return conf._urls_cache
def urls(conf): if hasattr(conf, '_urls_cache'): return conf._urls_cache new_urlpatterns = [] for pattern in urlpatterns: # Call to recursively apply the conf and bases to each of the # views referenced in the urlconf. new_urlpatterns.append( self.add_conf_to_pattern(pattern, self.conf, bases)) conf._urls_cache = urlconf_include( new_urlpatterns, app_name=self.application_name.split('.')[-1], namespace=self.local_name) return conf._urls_cache