parent
3b6571623f
commit
6c034b88d3
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue