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([]))
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, []))