示例#1
0
def get_area_list(request, parent_region_code):
    children = children_of(parent_region_code) 
    print parent_region_code
    print children
    ret = []
    for c in children:
        subarea = {
            'id':c['region-code'],
            'name': c['name'],
        }
        ret.append(subarea)

    ret = simplejson.dumps(ret)
    return HttpResponse(ret)