【发布时间】:2014-05-15 03:03:04
【问题描述】:
我有服务器。他以下一种格式返回 json:
{
"count": 6,
"next": null,
"previous": null,
"results": [
{
"id": 2,
"court": "http://reg-corruption.herokuapp.com/api/court/2/",
"result": "result2",
"date_meeting": "2014-03-12T17:50:30Z"
},
{
"id": 3,
"court": "http://reg-corruption.herokuapp.com/api/court/2/",
"result": "result22",
"date_meeting": "2014-03-13T17:50:46Z"
}, ] }
我想写客户端。在客户端我可以复制models.py,但我如何使用它来向服务器发送请求。主要问题:我有文件 models.py,它适用于 sqlite 数据库。我可以使用此文件连接到 REST 服务器吗?我可以自动加载外键链接吗? 或者我要阅读或使用什么?
【问题讨论】:
标签: django rest django-rest-framework rest-client