【文件属性】:
文件名称:wagtail-api:Axios包装器可轻松从其api中获取wagtail数据
文件大小:4KB
文件格式:ZIP
更新时间:2021-03-31 19:20:44
JavaScript
适用于Node.js的Wagtail API
如果您想在javascript中使用wagtail api端点,则此小模块将有所帮助。
import api from 'wagtail-api';
// to fetch the content of a specific page
var pageContent = await api.pages.$get(3);
// to fetch the content of a page based on the slug
var pageContent = await api.pages.$path("/about-us");
按子弹查找页面:
为了找到基于mysite/api.py (而不是ID)的页面,请将其添加到您的mysite/api.py文件中:
class CustomPagesAPIViewSet(PagesAPIVie
【文件预览】:
wagtail-api-master
----.gitignore(1KB)
----README.md(2KB)
----package.json(331B)
----index.js(782B)
----model.js(2KB)
----package-lock.json(696B)