def county_json(request, county, state): ''' Render json of individual county's data ''' data = api.read_county(county, state) return HttpResponse(data, mimetype="application/json")
def county(request, county, state): ''' Display data for an individual county ''' data = { "county_data": json.loads(api.read_county(county, state)) } return render(request, "county.html", data)