You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need patches like the following to have a field crossing a reference:
classPassengersFilter(BoundingBoxFilter):
"""Filter customized by the calculated field"""geometry_fields= ['location_point']
@admin.register(Passenger)classSomeAdmin(LeafletGeoAdminMixin, LeafletAdminListMixin, admin.ModelAdmin):
list_filter= (
...
PassengersFilter,
)
geometry_fields= ['location_point']
defget_queryset(self, request):
ret=super().get_queryset(request).annotate(location_point=Centroid('location__point'))
returnretdefget_geojson_feature_verbose_name(self, request, name, o, queryset):
return_('Passenger Location')
It's probably useful to have them automatically only based on the geometry_fields definition.
The text was updated successfully, but these errors were encountered:
nnseva
changed the title
Support geometry field references crossing foreign keys, like:
Support geometry field references crossing foreign keys
Apr 1, 2022
We need patches like the following to have a field crossing a reference:
It's probably useful to have them automatically only based on the
geometry_fields
definition.The text was updated successfully, but these errors were encountered: