Skip to content

Commit

Permalink
Add back 1.0.X compatibility for Router URL resolution.
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Willison <simon@simonwillison.net>
  • Loading branch information
brosner authored and Simon Willison committed May 5, 2009
1 parent c533ebb commit d87db55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django_openid/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ def from_openid_response(cls, openid_response):
class Router(object):
def __init__(self, *urlpairs):
self.urlpatterns = patterns('', *urlpairs)
self.resolver = urlresolvers.RegexURLResolver(r'^/', self)
# for 1.0 compatibility we pass in None for urlconf_name and then
# modify the _urlconf_module to make self hack as if its the module.
self.resolver = urlresolvers.RegexURLResolver(r'^/', None)
self.resolver._urlconf_module = self

def handle(self, request, path_override=None):
if path_override is not None:
Expand Down

0 comments on commit d87db55

Please sign in to comment.