          if not isinstance(data, (list, tuple)):
              return super(WhereNode, self).add(data, connector)
  
          obj, lookup_type, value = data
          alias, col, field = obj.alias, obj.col, obj.field
  
          if not hasattr(field, "geom_type"):
              # Not a geographic field, so call `WhereNode.add`.
              return super(GeoWhereNode, self).add(data, connector)
          else:
 
</s> remove             return super(WhereNode, self).add(((alias, col, field.db_type()), lookup_type, annotation, params), connector)
 </s> add             return super(WhereNode, self).add(((obj.alias, col, field.db_type()), lookup_type, annotation, params), connector) </s> remove         dallas = City.objects.create(name='Dallas', location=loc2)
        houston = City.objects.create(name='Houston', location=loc1)
 </s> add         dallas = City.objects.create(name='Dallas', state='TX', location=loc2)
        houston = City.objects.create(name='Houston', state='TX', location=loc1) </s> remove from django.contrib.gis.db.models import F, Extent, Union
 </s> add from django.contrib.gis.db.models import Count, Extent, F, Union </s> remove from models import City, Location, DirectoryEntry, Parcel
 </s> add from models import City, Location, DirectoryEntry, Parcel, Book, Author
        col, field = obj.col, obj.field
          if not isinstance(data, (list, tuple)):
              return super(WhereNode, self).add(data, connector)
  
          obj, lookup_type, value = data
        col, field = obj.col, obj.field
  
          if not hasattr(field, "geom_type"):
              # Not a geographic field, so call `WhereNode.add`.
              return super(GeoWhereNode, self).add(data, connector)
          else:
keep keep keep keep replace keep keep keep keep keep
 Fixed #11087 -- Fixed the `Count` annotation when used with `GeoManager`.  Thanks to dgouldin for ticket and initial patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10912 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/contrib/gis/db/models/sql/where.py