I'm just moving an application that we were writing over to the
GeoDjango branch and I've come across a small problem that I was
hoping that someone may be able to shed a little light on.
I have a model
class CityArea(models.Model, models.GeoMixin):
name = models.CharField(blank=False, maxlength=100, core=True)
city = models.ForeignKey('City')
poly = models.PolygonField(blank=True)
objects = models.GeoManager()
And I can interact with and create instances of this model using the
shell interface:
ca = CityArea(name='Jesmond', city=c, poly='POLYGON(( 10 10, 10 20, 20
20, 20 15, 10 10))')
ca.save()
This works fine. However I am unable to add a new one using the admin
interface. I can however edit those that are already created. So the
above example becomes available in the admin interface and I can
happily use the interfaces functionality to manipulate it. Like I said
the problem only occurs when attempting to create a new instance. When
ever I try this I get the following error:
Request Method: GET
Request URL: http://0.0.0.0:8000/admin/properties/cityarea/add/
Exception Type: GEOSException
Exception Value: Invalid HEX given!
Exception Location: /sw/lib/python2.5/site-packages/django/contrib/gis/
geos/GEOSGeometry.py in __init__, line 143
Any help would be much appreciated. Thanks
Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---