django-template-shorcuts
Remove boilerplate code when including JS and CSS files hosted by popular CDNs.
Requirements
Core
Python 2.7+ or Python 3.3+
Django 1.7 through Django 1.9
Installation
pip install django-template-shorcuts
Add to your installed apps in settings
INSTALLED_APPS = (
...
'template_shortcuts',
...
)
TEMPLATE_CDN_PROVIDER = "template_shortcuts.providers.google.Google"
There is support for multiple CDN backends and multiple JS libraries. Currently only the Google CDN is supported with some support for Cloudfare’s CDNJS.
Usage
{% load shortcuts %}
{% jquery "1.7.2" %}
Will yeild:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
Contributing
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.
Release files for django-template-shortcuts 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-template-shortcuts-0.2.2.tar.gz | 4.6 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_template_shortcuts-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
| django_template_shortcuts-0.2.2-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 19.3 kB
Release files / django-template-shortcuts-0.2.2.tar.gz
| Download URL | django-template-shortcuts-0.2.2.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eaf4ca9df3ef1e2b45cec0a78aa8137e983a64206b6d82820969686d0f0b52c1
|
|
BLAKE2b-256 checksum How to use checksums |
7078971f752239da1a7fe9459e811a0b21e365239eacb40ed32758a59cc034d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_template_shortcuts-0.2.2-py3-none-any.whl
| Download URL | django_template_shortcuts-0.2.2-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e666d4ceadbc0e183f2bd0a5c7223df1bcc0f63b5dade39674f8a22fa4bc8bc
|
|
BLAKE2b-256 checksum How to use checksums |
567bea42f9e6a23f930593229cfc7a1bb386949d3f3f918a5b9bab97b3f0f0ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_template_shortcuts-0.2.2-py2-none-any.whl
| Download URL | django_template_shortcuts-0.2.2-py2-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
ebc90c5e12705b467ffc61f78741daf32da71d29f60a84c1d526e7a1569c0eb5
|
|
BLAKE2b-256 checksum How to use checksums |
e80f042c94457d3e13077816311cd32e0daf1f86212c4408ad4647db6ae10f03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |