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