def get_streets(request, districtid):
    """
    Returns all streets for given district
    """

    # check if district exists
    district = get_object_or_404(District.objects, districtid=districtid)

    streets = Street.objects.filter(districtid=districtid)

    street_list = []

    for street in streets:
        street_list.append(street.name)

    return HttpResponse(simplejson.dumps(street_list), mimetype='application/json')