def save_as_EventAggregate(zl, cluster_center): ea = EventAggregate(timestamp=datetime.datetime.now(), radius=cluster_center[2], zoom_level=zl, location=denormalise_point(*cluster_center[:2]) ) ea.save()
def get_object_list(self, request): """Method getting a list of objects. Example filters: * getting from within box: ``?format=json&location__within_box=[[1, 50], [60, 56]]`` """ filters = self.extract_filters(request) all_objs = EventAggregate.objects() return self.apply_filters(all_objs, filters)