MCPcopy
hub / github.com/django/django / _init_options

Method _init_options

django/contrib/gis/serializers/geojson.py:13–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

11 """
12
13 def _init_options(self):
14 super()._init_options()
15 self.geometry_field = self.json_kwargs.pop("geometry_field", None)
16 self.id_field = self.json_kwargs.pop("id_field", None)
17 self.srid = self.json_kwargs.pop("srid", 4326)
18 if (
19 self.selected_fields is not None
20 and self.geometry_field is not None
21 and self.geometry_field not in self.selected_fields
22 ):
23 self.selected_fields = [*self.selected_fields, self.geometry_field]
24
25 def start_serialization(self):
26 self._init_options()

Callers 1

start_serializationMethod · 0.95

Calls 1

popMethod · 0.45

Tested by

no test coverage detected