From 69c76d7e08a62b0f6ce3112a4a368462138512c9 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 24 Mar 2006 19:15:57 +0000 Subject: [PATCH] magic-removal: Merged to [2558] git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2559 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/model-api.txt | 5 +++++ docs/outputting_pdf.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/model-api.txt b/docs/model-api.txt index b47b6cf054..4932dc6d79 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -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 ============ diff --git a/docs/outputting_pdf.txt b/docs/outputting_pdf.txt index 37e2779032..a58cf2c217 100644 --- a/docs/outputting_pdf.txt +++ b/docs/outputting_pdf.txt @@ -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)