If I have 1 model with 3 different geo_fields in (point, poly and line), can I serialize all of these with django-rest-framework-gis?
My model:
class Job(BaseModel):
name = models.CharField(max_length=64)
desc = models.CharField(max_length=64)
loc_poly = models.PolygonField(blank=True)
loc_polyline = models.LineStringField(blank=True)
loc_point = models.PointField(blank=True)
user = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True)
Can I serialize by doing something like:
class JobSerializer(GeoFeatureModelSerializer):
class Meta:
model = Job
geo_field = ("loc_point", "loc_polyline", "loc_poly")
fields = ('__all__',)
Basically can I have geo_field to be multiple geo fields? Or is this only 1?