可重用django模板标记
django-template-shortcuts的Python项目详细描述
要求
核心
- 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.