renaming the fields directory to fields_bak solved the issue...
Le 15/06/2010 11:23, guillaume a ï¿œcrit :
The problem is that you've got some vestigal code from a previous
release in your Django tree --
`django/contrib/gis/db/models/fields/__init__.py` is no longer used, and
the module was renamed to `fields.py`.
This typically occurs when upgrading via SVN as it leaves the directory
when doing `svn update`.
Le 15/06/2010 16:40, Justin Bronn a ï¿œcrit :
I have a simple geographic model designed to store polygons :
month = models.IntegerField("Mois")
year = models.IntegerField("Annï¿œe")
layer = models.ForeignKey(Layer)
geom = models.PolygonField(dim=2)
objects = models.GeoManager()
verbose_name_plural = "Bounding boxes"
Then I want to add an objects to it :
I retrieve a bbox and make a polygon from it:
poly_obj = Polygon.from_bbox(vals)
# add the object
my_bbox = SpatialHits(layer=my_layer, month=now.month, year=now.year,
the system then complains about the object conflicting with the 2 dims
geometry constraint. If I drop that constraint, the records are
definitely 3D. If i check poly_obj.wkt out before creating the new
object, it is a normal 2D object.
I think something is transforming it to a 3D object on the new record
initialization, but can't figure out how.
Thanks for your clues,