Hello everybody, I'm working with django and geodjango and now I have a problem with the geometry. I want that users can introduce coordinates in a form and then, these are saved in a database (postgis).
Now, I can save X and Y coordinates, but the geom field doesn't work and I don't know why. In my models.py I have create the next class: from django.contrib.gis.db import models class Pozo(models.Model): # gid_pozo = models.IntegerField(primary_key=True) # gid_colector = models.ForeignKey(Colector) coorx = models.IntegerField() coory = models.IntegerField() geom = models.PointField() objects = models.GeoManager() When I introduce coordinates, I get this error: null value in column "geom" violates not-null constraint DETAIL: Failing row contains (7, -1, 1, null). 7 = id, -1, 1 =coordinates, null=geom What I can solve this trouble? Thank you very much! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ec67c578-f073-4845-822f-5684d0174db7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.