可重用django模板标记

django-template-shortcuts的Python项目详细描述


django模板shorcuts

CIVersionDownloads

当包含由流行cdn托管的js和css文件时,删除样板代码。

要求

核心

  • python 2.7+或python 3.3+
  • Django 1.7至Django 1.9

安装

pip install django-template-shorcuts

在“设置”中添加到已安装的应用程序中

INSTALLED_APPS=(...'template_shortcuts',...)TEMPLATE_CDN_PROVIDER="template_shortcuts.providers.google.Google"

它支持多个cdn后端和多个js库。 目前只有google cdn支持cloudfare的cdnjs。

用法

{%loadshortcuts%}{%jquery"1.7.2"%}

威尔·耶尔德:

<scripttype="text/javascript"src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

贡献

Found an issue or just want to add some functionality? Open an issue in the issue tracker on github, fork the project, hack away, and make a pull request when you’re done.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
c#Java Tcp服务器和。Net Tcp客户端的发送和接收问题   安卓应用程序上的java标记地理位置,其位置位于我周围5Km半径范围内。   向java添加对话框并检索html文件   当eclipse甚至无法打开时,java会在eclipse中更改不兼容的JVM   java中同一jframe中的jlabel和paintComponent   基于另一数组排序的java排序   java AADSTS7000012:该补助金是为另一个租户获得的   java在JSF中使用foreach循环   java如何通过maven为运行junit测试创建运行配置?   java Selenium webDriver不稳定错误堆栈跟踪   java有没有办法创建以键为大写的JSON对象?