          # Adding two more cities, but this time making sure that their location
          # ID values do not match their City ID values.
          loc1 = Location.objects.create(point='POINT (-95.363151 29.763374)')
          loc2 = Location.objects.create(point='POINT (-96.801611 32.782057)')
          dallas = City.objects.create(name='Dallas', location=loc2)
          houston = City.objects.create(name='Houston', location=loc1)
  
          # The expected ID values -- notice the last two location IDs
          # are out of order.  We want to make sure that the related
          # location ID column is selected instead of ID column for
          # the city.
 
</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         alias, col, field = obj.alias, obj.col, obj.field
 </s> add         col, field = obj.col, obj.field </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
        dallas = City.objects.create(name='Dallas', state='TX', location=loc2)
        houston = City.objects.create(name='Houston', state='TX', location=loc1)
          # Adding two more cities, but this time making sure that their location
          # ID values do not match their City ID values.
          loc1 = Location.objects.create(point='POINT (-95.363151 29.763374)')
          loc2 = Location.objects.create(point='POINT (-96.801611 32.782057)')
        dallas = City.objects.create(name='Dallas', state='TX', location=loc2)
        houston = City.objects.create(name='Houston', state='TX', location=loc1)
        dallas = City.objects.create(name='Dallas', state='TX', location=loc2)
        houston = City.objects.create(name='Houston', state='TX', location=loc1)
  
          # The expected ID values -- notice the last two location IDs
          # are out of order.  We want to make sure that the related
          # location ID column is selected instead of ID column for
          # the city.
keep keep keep keep replace 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/tests/relatedapp/tests.py