(self, obj)
| 246 | field_type = "location" |
| 247 | |
| 248 | def prepare(self, obj): |
| 249 | from haystack.utils.geo import ensure_point |
| 250 | |
| 251 | value = super().prepare(obj) |
| 252 | |
| 253 | if value is None: |
| 254 | return None |
| 255 | |
| 256 | pnt = ensure_point(value) |
| 257 | pnt_lng, pnt_lat = pnt.coords |
| 258 | return "%s,%s" % (pnt_lat, pnt_lng) |
| 259 | |
| 260 | def convert(self, value): |
| 261 | from django.contrib.gis.geos import Point |
nothing calls this directly
no test coverage detected