parent
f8e89d46c6
commit
32e96f5807
|
@ -19,13 +19,13 @@ from milla.app import *
|
|||
from milla.auth.decorators import *
|
||||
from webob.exc import *
|
||||
import webob
|
||||
import urllib
|
||||
try:
|
||||
import urllib.parse
|
||||
except ImportError:
|
||||
except ImportError: #pragma: no cover
|
||||
import urllib
|
||||
import urlparse
|
||||
urllib.parse = urlparse
|
||||
|
||||
urllib.parse.urlencode = urllib.urlencode #@UndefinedVariable
|
||||
|
||||
def allow(*methods):
|
||||
'''Specify the allowed HTTP verbs for a controller callable
|
||||
|
@ -82,7 +82,7 @@ class Request(webob.Request):
|
|||
url = self._merge_url(self.script_name, path)
|
||||
|
||||
if keywords:
|
||||
url += '?' + urllib.urlencode(keywords)
|
||||
url += '?' + urllib.parse.urlencode(keywords)
|
||||
|
||||
return url
|
||||
|
||||
|
@ -102,7 +102,7 @@ class Request(webob.Request):
|
|||
url = self._merge_url(self.application_url, path)
|
||||
|
||||
if keywords:
|
||||
url += '?' + urllib.urlencode(keywords)
|
||||
url += '?' + urllib.parse.urlencode(keywords)
|
||||
|
||||
return url
|
||||
|
||||
|
|
Loading…
Reference in New Issue