From f40f90d63b4be295269b5f0de5f919be22daba5c Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Sun, 3 Nov 2013 12:45:15 +0100 Subject: [PATCH] Fixed regressions from 36ded01527b690b5df0574492af9cfcc2ea3d1dc. Refs #21302 --- django/contrib/gis/db/models/sql/aggregates.py | 5 +++-- django/db/models/sql/aggregates.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/django/contrib/gis/db/models/sql/aggregates.py b/django/contrib/gis/db/models/sql/aggregates.py index 68fc12e54c8..c0a7d894ebc 100644 --- a/django/contrib/gis/db/models/sql/aggregates.py +++ b/django/contrib/gis/db/models/sql/aggregates.py @@ -1,8 +1,9 @@ -from django.db.models.sql.aggregates import Aggregate, Count +from django.db.models.sql import aggregates +from django.db.models.sql.aggregates import * # NOQA from django.contrib.gis.db.models.fields import GeometryField -__all__ = ['Count', 'Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union'] +__all__ = ['Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union'] + aggregates.__all__ class GeoAggregate(Aggregate): diff --git a/django/db/models/sql/aggregates.py b/django/db/models/sql/aggregates.py index 0e1794e0a9d..8542a330c64 100644 --- a/django/db/models/sql/aggregates.py +++ b/django/db/models/sql/aggregates.py @@ -5,6 +5,10 @@ import copy from django.db.models.fields import IntegerField, FloatField + +__all__ = ['Aggregate', 'Avg', 'Count', 'Max', 'Min', 'StdDev', 'Sum', 'Variance'] + + # Fake fields used to identify aggregate types in data-conversion operations. ordinal_aggregate_field = IntegerField() computed_aggregate_field = FloatField()