'Reset `urls.py` for a set of Django apps.'

def reset_urls(self, urlconf_modules=None):

    if (urlconf_modules is None):
        urlconf_modules = [settings.ROOT_URLCONF]
        if (self.URLCONF_MODULES is not None):
            urlconf_modules.extend(self.URLCONF_MODULES)
    for urlconf in urlconf_modules:
        if (urlconf in sys.modules):
            reload(sys.modules[urlconf])
    clear_url_caches()
    resolve('/')
