I have simple model like this:
class Something(models.Model):
data = models.CharField(max_length=200)
And when Im performing this:
Something.objects.all().query
I get this:
<django.db.models.sql.query.Query object at 0xa57b9ec>
What is it mean?
Im using newest version of Django (1.5.2). In older versions .query was returned a string with the SQL query. How can I get it in new version?
Queryobject?print(Something.objects.all().query), What version of django are you on? What environment are you inspecting.query? github.com/django/django/blob/master/django/db/models/sql/…Something.objects.all().query.__str__()work?str()is helped. Everything appeared out to be not so hard :)