从页面中提取{%block-s%}并将其作为json发送的中间件。这允许客户端更新部分页面,这对于使用history.pushstate的ajax应用程序和站点非常有用。如果/mypage/在模板中有{%block main_content%},请请求/mypage/?partial=main_content,您将收到一个json:{“main_content”:“…”}。bitbucket中的示例django项目包含一个工作的javascript模块,该模块处理这些请求并执行更多操作。
django-partial-page的Python项目详细描述
从页面中提取{%block-s%}并将其作为json发送的中间件。这允许客户端更新部分页面,这对于使用history.pushstate的ajax应用程序和站点非常有用。如果/mypage/在模板中有{%block main_content%},请请求/mypage/?partial=main_content,您将收到一个json:{“main_content”:“…”}。bitbucket中的示例django项目包含一个工作的javascript模块,该模块处理这些请求并执行更多操作。
- 此包Python名称:django-partial-page
- 目前版本: django-partial-page 0.4.1
- 最后维护时间:Aug 11, 2011
- 摘要:Middleware that extracts {% block-s %} from pages and sends them as JSON. This allows the clients update parts of the pages, which is useful for Ajax apps and sites using History.PushState. If /mypage/ has {% block main_content %} in the template, make a request /mypage/?partial=main_content, and you'll receive a JSON: {"main_content": "..."}. The example Django project in the BitBucket contains a working JavaScript module that handles these requests and does something more.
- 安装命令:pip install django-partial-page
- 其它:django-partial-page 这个Python第三方库的作者没有提供更多的项目描述信息了,2019-11-11 22:36:34。
- 可以返回 PyPI第三方库 首页,查找更多相关Python包程序。