mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
boulder-oracle-sprint: Merged to [5466]
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@5467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0f36cbec13
commit
1f09aa1e7b
@ -65,10 +65,7 @@ def encode_multipart(boundary, data):
|
||||
if isinstance(value, file):
|
||||
lines.extend([
|
||||
'--' + boundary,
|
||||
'Content-Disposition: form-data; name="%s"' % key,
|
||||
'',
|
||||
'--' + boundary,
|
||||
'Content-Disposition: form-data; name="%s_file"; filename="%s"' % (key, value.name),
|
||||
'Content-Disposition: form-data; name="%s"; filename="%s"' % (key, value.name),
|
||||
'Content-Type: application/octet-stream',
|
||||
'',
|
||||
value.read()
|
||||
@ -251,4 +248,4 @@ class Client:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
|
@ -598,7 +598,7 @@ related ``Person`` *and* the related ``City``::
|
||||
p = b.author # Doesn't hit the database.
|
||||
c = p.hometown # Doesn't hit the database.
|
||||
|
||||
sv = Book.objects.get(id=4) # No select_related() in this example.
|
||||
b = Book.objects.get(id=4) # No select_related() in this example.
|
||||
p = b.author # Hits the database.
|
||||
c = p.hometown # Hits the database.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user