Skip to content

Instantly share code, notes, and snippets.

View JosephSalisbury's full-sized avatar
🏹

Joe Salisbury JosephSalisbury

🏹
View GitHub Profile
@rfj001
rfj001 / MultiLocationField.py
Last active June 29, 2016 11:24
MultiLocationField for django-haystack
import datetime
import six
from django.contrib.gis.geos import Point, MultiPoint
from haystack import indexes
from haystack.exceptions import SpatialError, SearchFieldError
from haystack.utils.geo import ensure_geometry, ensure_point
def ensure_multipoint(geom):