New: property .sql in order to obtain sql string instead of calling str(sql)

This commit is contained in:
2014-11-26 10:45:42 +01:00
parent d59109eee9
commit 9e8df25a2a

View File

@@ -309,6 +309,10 @@ class SQLCompiler(object):
__str__ = __repr__
@property
def sql(self,):
return self.__str__(self)
class Queryset(SQLCompiler, SQLQuery):
pass