예제 #1
0
def cities_view(request):
    if 'province' not in request.GET:
        raise SuspiciousOperation
    province = request.GET['province']
    options = city_options(province)
    return HttpResponse(SchoolSelect(choices=options).render_options([]))
예제 #2
0
def cities_view(request):
    if 'province' not in request.REQUEST:
        raise SuspiciousOperation
    province = request.REQUEST['province']
    options = city_options(province)
    return HttpResponse(SchoolSelect().render_options(options, []))