可重用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第三方库


热门话题
java Android改造响应不等于邮递员响应   bean的spring初始化失败;嵌套的例外是java。lang.IllegalArgumentException:Pointcut格式不正确:应为“')”   java在运行时传递可选的未知参数   java Android:无法使用密码保护条目   java无法从SimpleIntegerProperty转换为属性<Integer>   java Ibatis:有没有办法在sqlmap xml中的Ibatis resultmap子选择中添加行处理程序?   java如何使用ant脚本运行maven项目?   java如何在DesignGridLayout库中动态创建JButton值?   java JPA多事务管理器   java Eclipse RCP,为编辑器添加了一个新视图   从源文件夹导入时,不会显示Java图像   使用hadoop2设置java单节点集群。4.0与cygwin   java如何连接图像?   JavaJPQL:向数据库中已经存在的值添加一个int值