Opened 4 years ago

Last modified 2 years ago

#18654 new New feature

Support for model properties that are not fields in LayerMapping

Reported by: msopacua Owned by: nobody
Component: GIS Version: master
Severity: Normal Keywords: LayerMapping
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


The GIS LayerMapping does explicit testing for model fields and has logic to support Foreign keys. However, this does not allow supporting the reverse relationship of foreign keys or to support fields that need some kind of translation or need to be spread across different fields/models (f.e. when a shape file contains compound fields).

The patch provided allows for 'class properties' to be filled by the layermap and contains a test for the concrete use case that prompted this enhancement.

Attachments (1)

django.contrib.gis.property_fields.patch (4.7 KB) - added by msopacua 4 years ago.
Add support for properties in LayerMap (fixed indentation)

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by msopacua

Add support for properties in LayerMap (fixed indentation)

comment:1 Changed 4 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to New feature

comment:2 Changed 2 years ago by timo

  • Patch needs improvement set

Patch no longer applies cleanly.

Note: See TracTickets for help on using tickets.
Back to Top