summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-06-30 12:34:29 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-06-30 12:34:29 +0000
commit415bd694f9de8252e8d47bdf3df73cc62ca97728 (patch)
tree237fa918225a9cdda54bff352819bb89650dff73 /django/core
parent61898d86276d236388c66a8f629ff6c3cfe04800 (diff)
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
Diffstat (limited to 'django/core')
-rw-r--r--django/core/urlresolvers.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
index 2ad63bfc7d..ff0bcbcfea 100644
--- a/django/core/urlresolvers.py
+++ b/django/core/urlresolvers.py
@@ -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()