Index: django/conf/global_settings.py
===================================================================
--- django/conf/global_settings.py	(revision 2294)
+++ django/conf/global_settings.py	(working copy)
@@ -132,6 +132,9 @@
 # Whether to prepend the "www." subdomain to URLs that don't have it.
 PREPEND_WWW = False
 
+# class that will resolve the url
+URL_RESOLVER = 'django.core.urlresolvers.URLResolver'
+
 # List of compiled regular expression objects representing User-Agent strings
 # that are not allowed to visit any page, systemwide. Use this for bad
 # robots/crawlers. Here are a few examples:
Index: django/core/urlresolvers.py
===================================================================
--- django/core/urlresolvers.py	(revision 2294)
+++ django/core/urlresolvers.py	(working copy)
@@ -9,7 +9,7 @@
 
 from django.http import Http404
 from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist
-import re
+import re, types
 
 class Resolver404(Http404):
     pass
@@ -59,18 +59,23 @@
             raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" % (func_name, mod_name, str(e))
 
 class RegexURLResolver(object):
-    def __init__(self, regex, urlconf_name):
+    def __init__(self, regex, url_patterns):
         # regex is a string representing a regular expression.
-        # urlconf_name is a string representing the module containing urlconfs.
+        # urlconf_name is a string representing the module containing urlconfs, or
+        # a tupple with parsed urlpatterns
         self.regex = re.compile(regex)
-        self.urlconf_name = urlconf_name
+        if isinstance(url_patterns, types.StringTypes):
+            self.urlconf_name = url_patterns
+        else:
+            self._url_patterns = url_patterns
+            
 
     def resolve(self, path):
         tried = []
         match = self.regex.search(path)
         if match:
             new_path = path[match.end():]
-            for pattern in self.urlconf_module.urlpatterns:
+            for pattern in self.url_patterns:
                 try:
                     sub_match = pattern.resolve(new_path)
                 except Resolver404, e:
@@ -87,14 +92,18 @@
         except AttributeError:
             try:
                 self._urlconf_module = __import__(self.urlconf_name, '', '', [''])
-            except ValueError, e:
+            except (ValueError, ImportError), e:
                 # Invalid urlconf_name, such as "foo.bar." (note trailing period)
                 raise ImproperlyConfigured, "Error while importing URLconf %r: %s" % (self.urlconf_name, e)
             return self._urlconf_module
     urlconf_module = property(_get_urlconf_module)
 
     def _get_url_patterns(self):
-        return self.urlconf_module.urlpatterns
+        try:
+            return self._url_patterns
+        except AttributeError:
+            self._url_patterns = self.urlconf_module.urlpatterns
+            return self._url_patterns
     url_patterns = property(_get_url_patterns)
 
     def _resolve_special(self, view_type):
@@ -110,3 +119,7 @@
 
     def resolve500(self):
         return self._resolve_special('500')
+        
+class URLResolver(RegexURLResolver):
+    def __init__(self, request, urlconf_name):
+        RegexURLResolver.__init__(self, r'^/', urlconf_name)
Index: django/core/handlers/base.py
===================================================================
--- django/core/handlers/base.py	(revision 2294)
+++ django/core/handlers/base.py	(working copy)
@@ -59,8 +59,23 @@
             if response:
                 return response
 
-        resolver = urlresolvers.RegexURLResolver(r'^/', settings.ROOT_URLCONF)
         try:
+            dot = settings.URL_RESOLVER.rindex('.')
+        except ValueError:
+            raise exceptions.ImproperlyConfigured, '%s isn\'t a resolver module' % URL_RESOLVER
+        ur_module, ur_classname = URL_RESOLVER[:dot], URL_RESOLVER[dot+1:]
+        try:
+            mod = __import__(ur_module, '', '', [''])
+        except ImportError, e:
+            raise exceptions.ImproperlyConfigured, 'Error importing urlresolver module %s: "%s"' % (ur_module, e)
+        try:
+                ur_class = getattr(mod, ur_classname)
+        except AttributeError:
+            raise exceptions.ImproperlyConfigured, 'Urlresolver module "%s" does not define a "%s" class' % (mw_module, mw_classname)
+        
+        resolver = ur_class(request, settings.ROOT_URLCONF)
+        
+        try:
             callback, callback_args, callback_kwargs = resolver.resolve(path)
 
             # Apply view middleware
