      border1 = models.PolygonField()
      border2 = models.PolygonField(srid=2276)
      objects = models.GeoManager()
      def __unicode__(self): return self.name
 
</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         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
# These use the GeoManager but do not have any geographic fields.
class Author(models.Model):
    name = models.CharField(max_length=100)
    objects = models.GeoManager()

class Book(models.Model):
    title = models.CharField(max_length=100)
    author = models.ForeignKey(Author, related_name='books')
    objects = models.GeoManager()
      border1 = models.PolygonField()
      border2 = models.PolygonField(srid=2276)
      objects = models.GeoManager()
      def __unicode__(self): return self.name
# These use the GeoManager but do not have any geographic fields.
class Author(models.Model):
    name = models.CharField(max_length=100)
    objects = models.GeoManager()

class Book(models.Model):
    title = models.CharField(max_length=100)
    author = models.ForeignKey(Author, related_name='books')
    objects = models.GeoManager()
keep keep keep add
 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/models.py