jquery(jquery.validate.js)的validate的fanstic打包
js.jquery_validate的Python项目详细描述
js.jquery_validate
Introduction
这个库为fanstatic打包jQuery Validation Plugin。
这需要web框架与fanstatic之间的集成, 并确保原始资源(在^{tt2}中$ js.jquery_validate中的目录被发布到某个url。
How to use?
这应该在呈现页面之前设置。详见fanstatic 信息:
>>> from fanstatic import init_needed >>> needed = init_needed(base_url='http://localhost')
您可以从js.jquery_validate和^{tt6}导入jquery_validate。$ 您希望这些资源包含在页面中的位置:
>>> from js.jquery_validate import jquery_validate >>> jquery_validate.need()
呈现包含:
>>> print needed.render() <script type="text/javascript" src="http://localhost/fanstatic/jquery/jquery.js"></script> <script type="text/javascript" src="http://localhost/fanstatic/jquery-validate/jquery.validate.js"></script>