Reusable Django templatetags
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-template-shortcuts-0.2.2.tar.gz.
File metadata
- Download URL: django-template-shortcuts-0.2.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eaf4ca9df3ef1e2b45cec0a78aa8137e983a64206b6d82820969686d0f0b52c1
|
|
| MD5 |
ca1eba634ec3fba5d9a11bfab735a113
|
|
| BLAKE2b-256 |
7078971f752239da1a7fe9459e811a0b21e365239eacb40ed32758a59cc034d5
|
File details
Details for the file django_template_shortcuts-0.2.2-py3-none-any.whl.
File metadata
- Download URL: django_template_shortcuts-0.2.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e666d4ceadbc0e183f2bd0a5c7223df1bcc0f63b5dade39674f8a22fa4bc8bc
|
|
| MD5 |
1a3d8c472a7ee2f9986fb4a75315900f
|
|
| BLAKE2b-256 |
567bea42f9e6a23f930593229cfc7a1bb386949d3f3f918a5b9bab97b3f0f0ed
|
File details
Details for the file django_template_shortcuts-0.2.2-py2-none-any.whl.
File metadata
- Download URL: django_template_shortcuts-0.2.2-py2-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebc90c5e12705b467ffc61f78741daf32da71d29f60a84c1d526e7a1569c0eb5
|
|
| MD5 |
051c4e273bd63fcb3299797db28a8d57
|
|
| BLAKE2b-256 |
e80f042c94457d3e13077816311cd32e0daf1f86212c4408ad4647db6ae10f03
|