【发布时间】:2013-01-15 02:34:03
【问题描述】:
django-debug-toolbar 需要它的输出是 html,但是 django-tastypie 的默认输出格式是 json。
我尝试发送http://localhost/api/v1/resource/?format=html,但它显示Sorry, not implemented yet. Please append "?format=json" to your URL
尽管此文档将 html 列为有效选项之一,但它在 TODO list 上注明。
http://django-tastypie.readthedocs.org/en/latest/serialization.html#to-html
如何使用调试工具栏来调试 sweetpie api 调用?
(例如,我想查看为 api 调用运行了多少 sql 查询……等等)
也许我可以从 django 视图中调用 api,但是如何调用?
【问题讨论】: