Potential Django Bug In Queryset.query?
Disclaimer: I'm still learning Django, so I might be missing something here, but I can't see what it would be... I'm running Python 2.6.1 and Django 1.2.1. (InteractiveConsole) >
Solution 1:
Ok, I just figured it out. It's not a bug. Browsing the source of django/db/models/sql/query.py:
160def__str__(self):
161"""
162 Returns the query as a string of SQL with the parameter values
163 substituted in.
164
165 Parameter values won't necessarily be quoted correctly, since that is
166 done by the database interface at execution time.
167 """168 sql, params = self.get_compiler(DEFAULT_DB_ALIAS).as_sql()
169return sql % params
(http://code.djangoproject.com/browser/django/trunk/django/db/models/sql/query.py)
Everything's working properly. :)
Post a Comment for "Potential Django Bug In Queryset.query?"