def api_overview(request): baseurl = "https://%s/api/v2/" % request.META["HTTP_HOST"] endpoints = ("bill", "cosponsorship", "person", "role", "vote", "vote_voter", "committee", "committee_member") api = [(model, build_api_documentation(*get_apiv2_model_qs(model))) for model in endpoints] return render_to_response("website/developers/api.html", {"baseurl": baseurl, "api": api}, RequestContext(request))
def api_overview(request): baseurl = "http://%s/api/v2/" % request.META["HTTP_HOST"] endpoints = ("bill", "cosponsorship", "person", "role", "vote", "vote_voter", "committee", "committee_member") api = [ (model, build_api_documentation(*get_apiv2_model_qs(model))) for model in endpoints ] return render_to_response('website/developers/api.html', { "baseurl": baseurl, "api": api, }, RequestContext(request))