Ticket #15209: with_clause_allow.diff
File with_clause_allow.diff, 620 bytes (added by , 14 years ago) |
---|
-
django/db/models/sql/query.py
63 63 for column_meta in self.cursor.description] 64 64 65 65 def validate_sql(self, sql): 66 if not sql.lower().strip().startswith( 'select'):66 if not sql.lower().strip().startswith(('select', 'with')): 67 67 raise InvalidQuery('Raw queries are limited to SELECT queries. Use ' 68 68 'connection.cursor directly for other types of queries.') 69 69