def get_sub_category(request):
    sub_cat_list = request.GET.getlist('cat_id[]')
    if (len(sub_cat_list) > 0):
        sub_cats = records_helper.SubCategoryList(sub_cat_list)
        html = []
        for sub in sub_cats:
            html.append((((('<option value="' + str(sub.id)) + '">') + str(sub)) + '</option>'))
        return HttpResponse(''.join(html))
    return HttpResponse('')
def get_sub_category(request):
    sub_cat_list = request.GET.getlist('cat_id[]')
    if (len(sub_cat_list) > 0):
        sub_cats = records_helper.SubCategoryList(sub_cat_list)
        html = []
        for sub in sub_cats:
            html.append((((('<option value="' + str(sub.id)) + '">') + str(sub)) + '</option>'))
        return HttpResponse(.join(html))
    return HttpResponse()