def update_city_area_order(request): new_order = simplejson.loads(request.POST['data']) for city_area_id in new_order.keys(): ca = CityArea.by_id(city_area_id) ca.set_order(new_order[city_area_id]) ca.save() return JSONResponse("")
def get_pricing_area_name(lat, lng): name = "" pricing_area = CityArea.get_pricing_area(lat, lng) if pricing_area: name = pricing_area.name return name