py3k: Fix imports

--HG--
branch : py3k
master
Dustin C. Hatch 2012-11-03 11:07:30 -05:00
parent 3b6571623f
commit 6c034b88d3
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -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)