Moved parse_sql import in django.utils.httpwrappers to the top of the module, not inside QueryDict.__init__()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
804154b9e0
commit
0ecdad8593
|
@ -3,6 +3,12 @@ from pprint import pformat
|
|||
from urllib import urlencode
|
||||
from django.utils.datastructures import MultiValueDict
|
||||
|
||||
try:
|
||||
# The mod_python version is more efficient, so try importing it first.
|
||||
from mod_python.util import parse_qsl
|
||||
except ImportError:
|
||||
from cgi import parse_qsl
|
||||
|
||||
class HttpRequest(object): # needs to be new-style class because subclasses define "property"s
|
||||
"A basic HTTP request"
|
||||
def __init__(self):
|
||||
|
@ -61,10 +67,6 @@ class QueryDict(MultiValueDict):
|
|||
"""A specialized MultiValueDict that takes a query string when initialized.
|
||||
This is immutable unless you create a copy of it."""
|
||||
def __init__(self, query_string):
|
||||
try:
|
||||
from mod_python.util import parse_qsl
|
||||
except ImportError:
|
||||
from cgi import parse_qsl
|
||||
if not query_string:
|
||||
self.data = {}
|
||||
self._keys = []
|
||||
|
|
Loading…
Reference in New Issue