コード例 #1
0
ファイル: core.py プロジェクト: 10clouds/citypulse
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()
コード例 #2
0
ファイル: resources.py プロジェクト: 10clouds/citypulse
    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)