python - Wagtail:如何在 REST API v2 上公开 wagtail 片段
问题描述
我创建了一堆 wagtail 片段,并且我已经设置了 wagtail 拥有的 REST API V2。但我不确定如何在端点上公开每个片段。我不想使用页面,因为我不需要它们。我只需要能够在 API 中公开这些片段。那可能吗?我想存档这样的东西:
http://localhost:8000/api/v2/my-snippet-model/
并且还可以添加过滤器。
谢谢!
解决方案
推荐阅读
- sql - 计算与我们进行 >10 次交易的客户,不包括退货
- python - 使用数据框的列值来索引多索引数据框的行
- java - 如何计算json对象项?
- java - 即使通过 java 设置了“读取”权限,也无法读取 Windows 文件
- swift - 如何继承SKspritenode并通过self.childNode创建
- c# - 如何使用 HttpWebRequest 获取 Url 的响应文本?
- python - pip3 install ibm_db 在 docker 镜像中失败
- java - Intellij 中的远程调试
- macos - 有谁知道如何取消隐藏视觉工作室中的断点功能?
- c# - 滚动到下拉列表中与按下的键匹配的列表