Commits

Ollie Rutherfurd committed 30b4b08

added 'easyurl' wrapper for django.conf.urls.defaults.url

Comments (0)

Files changed (1)

 # don't require creating an instance of the class
 regex = URLPatternGenerator()
 
+try:
+    from django.conf.urls.defaults import url as _url
+    def easyurl(url, *args, **kw):
+        return _url(regex(url), *args, **kw)
+except ImportError:
+    pass
+
 
 if __name__ == '__main__':
     import doctest; doctest.testmod()