Skip to content

Set geo_field to a geo_field from a linked model #49

@achraibi

Description

@achraibi

Given the following models, is there a way to serialize MainModel as Geojson by specifying the geo_field attribute from the linked GeoModel ?

class GeoModel(models.Model):
    point = models.PointField()
    objects = models.GeoManager()

class MainModel(models.Model):
    geo_model = models.ForeignKey(GeoModel)

Willing to help contributing if some insight about implementation could be shared. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions