diff --git a/src/milla/__init__.py b/src/milla/__init__.py index c391afb..2b431c0 100644 --- a/src/milla/__init__.py +++ b/src/milla/__init__.py @@ -15,11 +15,11 @@ ''' -from app import * +from milla.app import * +from milla.auth.decorators import * from webob.exc import * from webob.request import * from webob.response import * -from auth.decorators import * def allow(*methods): '''Specify the allowed HTTP verbs for a controller callable diff --git a/src/milla/dispatch/routing.py b/src/milla/dispatch/routing.py index 0ef4e6f..c350e49 100644 --- a/src/milla/dispatch/routing.py +++ b/src/milla/dispatch/routing.py @@ -25,7 +25,11 @@ import milla import re import sys import urllib -import urlparse +try: + import urllib.parse +except ImportError: + import urlparse + urllib.parse = urlparse class Router(object): '''A dispatcher that maps arbitrary paths to controller callables @@ -236,7 +240,7 @@ class Generator(object): url = self.request.relative_url(path, to_application=True) if self.path_only: - split = urlparse.urlsplit(url) + split = urllib.parse.urlsplit(url) url = split.path if vars: url += '?' + urllib.urlencode(vars)