1
我使用django-jsonify到Django的變量轉換成JavaScript的JSON,並返回該名單如何Django的變量轉換成JSON模板正確
[{"pk": 4, "model": "api.post", "fields": {"summary": "Testing", "title": "My Test"}}, {"pk": 5, "model": "api.post", "fields": {"summary": "testing again", "title": "Another test"}}]
但所需的列表是
[{"pk": 4,"summary": "Testing", "title": "My Test"}, {"pk": 5,"summary": "testing again", "title": "Another test"}]
我決定使用骨幹與tastypie來獲取數據 –