1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

magic-removal: Merged to [2558]

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2559 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-03-24 19:15:57 +00:00
parent f95dd12050
commit 69c76d7e08
2 changed files with 6 additions and 1 deletions

View File

@ -1090,7 +1090,12 @@ directly within the SQL. If you use this technique, the underlying database
library will automatically add quotes and escaping to your parameter(s) as
necessary.
A final note: If all you want to do is a custom ``WHERE`` clause, you can just
just the ``where``, ``tables`` and ``params`` arguments to the standard lookup
API. See `Other lookup options`_.
.. _Python DB-API: http://www.python.org/peps/pep-0249.html
.. _Other lookup options: http://www.djangoproject.com/documentation/db_api/#other-lookup-options
Using models
============

View File

@ -117,7 +117,7 @@ efficient. Here's the above "Hello World" example rewritten to use
response = HttpResponse(mimetype='application/pdf')
response['Content-Disposition'] = 'attachment; filename=somefilename.pdf'
buffer = String()
buffer = StringIO()
# Create the PDF object, using the StringIO object as its "file."
p = canvas.Canvas(buffer)