[Django]-In django 1.2.1 how can I get something like the old .as_sql?

4👍

qs=Model.objects.all()
qs.query.as_sql() 

Should do the job as it is shown here

EDIT:

I just try it and get the same error.

qs=Model.objects.all()
print qs.query

this must give you what you want (:

👤Mp0int

Leave a comment