Python django.db.models.aggregates.Aggregate() Examples
The following are 3
code examples of django.db.models.aggregates.Aggregate().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
django.db.models.aggregates
, or try the search function
.
Example #1
Source File: statistics.py From openhgsenti with Apache License 2.0 | 5 votes |
def resolve_expression(self, query=None, allow_joins=True, reuse=None, summarize=False, for_save=False): return super(Aggregate, self).resolve_expression(query, allow_joins, reuse, summarize)
Example #2
Source File: statistics.py From python2017 with MIT License | 5 votes |
def resolve_expression(self, query=None, allow_joins=True, reuse=None, summarize=False, for_save=False): return super(Aggregate, self).resolve_expression(query, allow_joins, reuse, summarize)
Example #3
Source File: tests.py From djongo with GNU Affero General Public License v3.0 | 5 votes |
def test_distinct_aggregation(self): class DistinctAggregate(Aggregate): allow_distinct = True aggregate = DistinctAggregate('first', 'second', distinct=True) msg = ( "SQLite doesn't support DISTINCT on aggregate functions accepting " "multiple arguments." ) with self.assertRaisesMessage(NotSupportedError, msg): connection.ops.check_expression_support(aggregate)