mirror of
https://github.com/django/django.git
synced 2025-10-27 23:56:08 +00:00
Fixed #7521 -- Added the ability to customize ROOT_URLCONF for the duration of a TestCase. Thanks to Mark Fargas (telenieko) for his work on this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7805 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -296,3 +296,8 @@ def reverse(viewname, urlconf=None, args=None, kwargs=None):
|
||||
kwargs = kwargs or {}
|
||||
return iri_to_uri(u'/' + get_resolver(urlconf).reverse(viewname, *args, **kwargs))
|
||||
|
||||
def clear_url_caches():
|
||||
global _resolver_cache
|
||||
global _callable_cache
|
||||
_resolver_cache.clear()
|
||||
_callable_cache.clear()
|
||||
|
||||
Reference in New Issue
Block a user