def geo_field(queryset):
    """Returns the GeometryField for a django or spillway GeoQuerySet."""
    try:
        return queryset.geo_field
    except AttributeError:
        return queryset._geo_field()
