(main_city)
return {
        'id': main_city.pk,
        'lat': main_city.latitude,
        'lng': main_city.longitude,
        'count': len(MapPointer.objects.filter(location__pk__in=id_list)),
    }
Creates cluster for given main city (either capital or region capital).
Creates cluster for given main city (either capital or region capital).
Creates cluster for given main city ( either capital or region capital ) .
def create_cluster(main_city):
    """ Creates cluster for given main city (either capital or region capital).
    """
    id_list = main_city.parent.get_children_id_list()
    return {
        'id': main_city.pk,
        'lat': main_city.latitude,
        'lng': main_city.longitude,
        'count': len(MapPointer.objects.filter(location__pk__in=id_list)),
    }
def create_cluster ( main_city ) : id_list = main_city . parent . get_children_id_list ( ) return { 'id' : main_city . pk , 'lat' : main_city . latitude , 'lng' : main_city . longitude , 'count' : len ( MapPointer . objects . filter ( location__pk__in = id_list ) ) , }