Ticket #25556: expressions_patch.py

File expressions_patch.py, 285 bytes (added by David Filipovic, 9 years ago)

django.db.models.expressions patch

Line 
1class DatePart(Date):
2 """
3 Add a partial date selection column.
4 """
5 def as_sql(self, compiler, connection):
6 sql, params = self.col.as_sql(compiler, connection)
7 assert not(params)
8 return connection.ops.date_extract_sql(self.lookup_type, sql), []
9
Back to Top