Changeset 7980
- Timestamp:
- 07/19/08 09:17:24 (4 months ago)
- Files:
-
- django/branches/gis/django/contrib/admin/media/img/gis (added)
- django/branches/gis/django/contrib/admin/media/img/gis/move_vertex_off.png (added)
- django/branches/gis/django/contrib/admin/media/img/gis/move_vertex_on.png (added)
- django/branches/gis/django/contrib/gis/admin (added)
- django/branches/gis/django/contrib/gis/admin/__init__.py (added)
- django/branches/gis/django/contrib/gis/admin/options.py (added)
- django/branches/gis/django/contrib/gis/admin/sites.py (added)
- django/branches/gis/django/contrib/gis/admin/widgets.py (added)
- django/branches/gis/django/contrib/gis/db/models/fields/__init__.py (modified) (3 diffs)
- django/branches/gis/django/contrib/gis/forms (added)
- django/branches/gis/django/contrib/gis/forms/fields.py (added)
- django/branches/gis/django/contrib/gis/forms/__init__.py (added)
- django/branches/gis/django/contrib/gis/templates/gis/admin (added)
- django/branches/gis/django/contrib/gis/templates/gis/admin/openlayers.html (added)
- django/branches/gis/django/contrib/gis/templates/gis/admin/openlayers.js (added)
- django/branches/gis/django/contrib/gis/templates/gis/admin/osm.html (added)
- django/branches/gis/django/contrib/gis/templates/gis/admin/osm.js (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/gis/django/contrib/gis/db/models/fields/__init__.py
r7840 r7980 1 from django.contrib.gis import forms 1 2 from django.db import connection 2 3 # Getting the SpatialBackend container and the geographic quoting method. … … 112 113 raise ValueError('Could not create geometry from lookup value: %s' % str(value)) 113 114 else: 114 raise TypeError('Cannot use parameter of `%s` type as a geometrylookup parameter.' % type(value))115 raise TypeError('Cannot use parameter of `%s` type as lookup parameter.' % type(value)) 115 116 116 117 # Assigning the SRID value. … … 137 138 # Setup for lazy-instantiated Geometry object. 138 139 setattr(cls, self.attname, GeometryProxy(SpatialBackend.Geometry, self)) 140 141 def formfield(self, **kwargs): 142 defaults = {'form_class' : forms.GeometryField, 143 'geom_type' : self._geom, 144 'null' : self.null, 145 } 146 defaults.update(kwargs) 147 return super(GeometryField, self).formfield(**defaults) 139 148 140 149 def get_db_prep_lookup(self, lookup_type, value):
