def awardee_rdf(request, institution_code): awardee = get_object_or_404(models.Awardee, org_code=institution_code) graph = awardee_to_graph(awardee) response = HttpResponse(graph.serialize(base=_rdf_base(request), include_base=True), content_type='application/rdf+xml') return response
def awardee_rdf(request, institution_code): awardee = get_object_or_404(models.Awardee, org_code=institution_code) graph = awardee_to_graph(awardee) response = HttpResponse(graph.serialize(base=_rdf_base(request), include_base=True), mimetype='application/rdf+xml') return response
def test_awardee(self): a = Awardee.objects.get(org_code='curiv') g = rdf.awardee_to_graph(a) u = URIRef('/awardees/curiv#awardee') self.assertEqual(g.value(u, RDF.type), NDNP['Awardee'])