fanstatic xeditable.
项目描述
js.xeditable
简介
此库封装了x-editable以供fanstatic使用。它支持不同的模式(正常、压缩)。
这需要您的Web框架与fanstatic之间的集成,并确保原始资源(在js.xeditable中的resources目录中提供)被发布到某个URL。
联系
- Andrew Mleczko <andrew.mleczko at redturtle.net>RedTurtle 技术,http://www.redturtle.net/
如何使用?
应在渲染页面之前设置。有关更多信息,请参阅fanstatic。
>>> from fanstatic import init_needed >>> needed = init_needed(base_url='http://localhost')
您可以从js.xeditable导入xeditable,并在希望包含这些资源的页面上需要它
>>> from js.xeditable import bootstrap_editable >>> bootstrap_editable.need()
渲染包含内容
>>> print needed.render() <script type="text/javascript" src="http://localhost/fanstatic/xeditable/js/bootstrap-editable.js"></script>
变更记录
1.4.5 (2013-07-11)
初始导入 [amleczko]