I have this Django model:
from django.contrib.gis.db import models
class Event(models.Model):
address = models.TextField()
point = models.PointField
I just had the same issue. For me, I needed to specify to not make a spatial_index. So your model would change to:
from django.contrib.gis.db import models
class Event(models.Model):
address = models.TextField()
point = models.PointField('coordinates', null=True, blank=True, spatial_index=False)
I don't think you have many options here. Either you use a placeholder such as (0, 0), or you encapsulate the point in an object and reference the object everywhere you need the point. That way the reference to the object could be made nullable, but the extra join would hurt performance and complicate things.
A quick idea would be to have another boolean field that you mark as true/false when you have an actual point. It would make querying easy because you could add the boolean field to the where clause.
class Event(models.Model):
...
has_point = models.BooleanField(default=False)
point = models.PointField('coordinates', ...)
Event.objects.filter(has_point=True)...#whatever else you need when handling location