From 596cb9c7e287abbb98c64974fb4944d522cb6b5a Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 28 Apr 2012 18:02:01 +0200 Subject: Replaced print statement by print function (forward compatibility syntax). --- docs/topics/db/sql.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/topics/db/sql.txt') diff --git a/docs/topics/db/sql.txt b/docs/topics/db/sql.txt index 658dfdf859..2ac47170aa 100644 --- a/docs/topics/db/sql.txt +++ b/docs/topics/db/sql.txt @@ -40,7 +40,7 @@ This is best illustrated with an example. Suppose you've got the following model You could then execute custom SQL like so:: >>> for p in Person.objects.raw('SELECT * FROM myapp_person'): - ... print p + ... print(p) John Smith Jane Jones @@ -128,8 +128,8 @@ The ``Person`` objects returned by this query will be deferred model instances fields that are omitted from the query will be loaded on demand. For example:: >>> for p in Person.objects.raw('SELECT id, first_name FROM myapp_person'): - ... print p.first_name, # This will be retrieved by the original query - ... print p.last_name # This will be retrieved on demand + ... print(p.first_name, # This will be retrieved by the original query + ... p.last_name) # This will be retrieved on demand ... John Smith Jane Jones @@ -153,7 +153,7 @@ of people with their ages calculated by the database:: >>> people = Person.objects.raw('SELECT *, age(birth_date) AS age FROM myapp_person') >>> for p in people: - ... print "%s is %s." % (p.first_name, p.age) + ... print("%s is %s." % (p.first_name, p.age)) John is 37. Jane is 42. ... -- cgit v1.3