summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronn <jbronn@gmail.com>2009-04-24 20:34:48 +0000
committerJustin Bronn <jbronn@gmail.com>2009-04-24 20:34:48 +0000
commit8010e0c32ee9ba5a0199ee477242b00f1d6627fd (patch)
treed6506d5e126c3568503ea7b89ee8bc4f9a9516ff
parent44c062344f77708fd68189cbd80792daf524e5a6 (diff)
Removed references to deprecated `GeometryField` atribute in `GeoModelAdmin`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10633 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/gis/admin/options.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/django/contrib/gis/admin/options.py b/django/contrib/gis/admin/options.py
index 7ec2c250ee..d729b88a5a 100644
--- a/django/contrib/gis/admin/options.py
+++ b/django/contrib/gis/admin/options.py
@@ -66,29 +66,29 @@ class GeoModelAdmin(ModelAdmin):
in the `widget` attribute) using the settings from the attributes set
in this class.
"""
- is_collection = db_field._geom in ('MULTIPOINT', 'MULTILINESTRING', 'MULTIPOLYGON', 'GEOMETRYCOLLECTION')
+ is_collection = db_field.geom_type in ('MULTIPOINT', 'MULTILINESTRING', 'MULTIPOLYGON', 'GEOMETRYCOLLECTION')
if is_collection:
- if db_field._geom == 'GEOMETRYCOLLECTION': collection_type = 'Any'
- else: collection_type = OGRGeomType(db_field._geom.replace('MULTI', ''))
+ if db_field.geom_type == 'GEOMETRYCOLLECTION': collection_type = 'Any'
+ else: collection_type = OGRGeomType(db_field.geom_type.replace('MULTI', ''))
else:
collection_type = 'None'
class OLMap(self.widget):
template = self.map_template
- geom_type = db_field._geom
+ geom_type = db_field.geom_type
params = {'default_lon' : self.default_lon,
'default_lat' : self.default_lat,
'default_zoom' : self.default_zoom,
'display_wkt' : self.debug or self.display_wkt,
- 'geom_type' : OGRGeomType(db_field._geom),
+ 'geom_type' : OGRGeomType(db_field.geom_type),
'field_name' : db_field.name,
'is_collection' : is_collection,
'scrollable' : self.scrollable,
'layerswitcher' : self.layerswitcher,
'collection_type' : collection_type,
- 'is_linestring' : db_field._geom in ('LINESTRING', 'MULTILINESTRING'),
- 'is_polygon' : db_field._geom in ('POLYGON', 'MULTIPOLYGON'),
- 'is_point' : db_field._geom in ('POINT', 'MULTIPOINT'),
+ 'is_linestring' : db_field.geom_type in ('LINESTRING', 'MULTILINESTRING'),
+ 'is_polygon' : db_field.geom_type in ('POLYGON', 'MULTIPOLYGON'),
+ 'is_point' : db_field.geom_type in ('POINT', 'MULTIPOINT'),
'num_zoom' : self.num_zoom,
'max_zoom' : self.max_zoom,
'min_zoom' : self.min_zoom,