In tastypie mia url:///corso/1/formato API v1 = JSON ha pronunciato la seguente JSON:django tastypie solo recuperare un particolare campo di un particolare oggetto
{
created_on: "2012-02-27T08:00:54",
description: "this is course 1",
id: "1",
resource_uri: "/api/v1/course/1/",
subjects: [
"/api/v1/subject/1/",
"/api/v1/subject/2/"
],
title: "Course 1"
}
voglio fare qualcosa di simile :
/api/v1/course/1/subjects/?format=json
per ottenere solo l'elenco di argomenti per un determinato corso. È possibile?
come servizi json non richiede SEO Non capisco il punto. O forse vuoi che tutte le materie siano legate al tuo corso. – christophe31
http://django-tastypie.readthedocs.org/en/latest/resources.html#reverse-relationships – christophe31
sì, mi stavo solo chiedendo se in un jest annidato più complicato, posso solo interrogare per l'entità che voglio. Voglio solo i soggetti, se possibile. In realtà questo json è troppo grande e stavo pensando se c'è un modo per farlo senza scrivere una nuova risorsa. – zubinmehta