UNKNOWN
Project description
django-template-shortcuts
=========================
[![Build Status](https://travis-ci.org/comandrei/django-template-shortcuts.png)](https://travis-ci.org/comandrei/django-template-shortcuts)
Remove boilerplate code when including JS and CSS files hosted by popular CDNs.
## Index
- [Instalation and configuration](#instalation)
- [Usage](#usage)
- [Supported libraries](#support)
## Instalation
Via pip:
```bash
pip install django-template-shortcuts
```
Via easy_install:
```bash
easy_install django-template-shortcuts
```
Clonning the project:
```bash
$ git clone git://github.com/comandrei/django-template-shortcuts.git
$ python django-template-shortcuts/setup.py install
```
Add the app to your installed apps:
```python
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
```python
{% load shortcuts %}
{% jquery "1.7.2" %}
```
Will yeild
```html
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
```
## Supported libraries
|Template Tag | Google | CDNJS |
|-------------|:-------:|:-------:|
|angular|:white_check_mark:|:white_check_mark:|
|chrome_frame|:white_check_mark:|:white_check_mark:|
|dojo|:white_check_mark:|:white_check_mark:|
|ext_core|:white_check_mark:|:white_check_mark:|
|jquery|:white_check_mark:|:white_check_mark:|
|jquery_ui|:white_check_mark:|:white_check_mark:|
|mootools|:white_check_mark:|:white_check_mark:|
|modernizr|:x:|:white_check_mark:|
|prototype|:white_check_mark:|:white_check_mark:|
|scriptaculos|:white_check_mark:|:white_check_mark:|
|webfont|:white_check_mark:|:white_check_mark:|
## 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.
=========================
[![Build Status](https://travis-ci.org/comandrei/django-template-shortcuts.png)](https://travis-ci.org/comandrei/django-template-shortcuts)
Remove boilerplate code when including JS and CSS files hosted by popular CDNs.
## Index
- [Instalation and configuration](#instalation)
- [Usage](#usage)
- [Supported libraries](#support)
## Instalation
Via pip:
```bash
pip install django-template-shortcuts
```
Via easy_install:
```bash
easy_install django-template-shortcuts
```
Clonning the project:
```bash
$ git clone git://github.com/comandrei/django-template-shortcuts.git
$ python django-template-shortcuts/setup.py install
```
Add the app to your installed apps:
```python
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
```python
{% load shortcuts %}
{% jquery "1.7.2" %}
```
Will yeild
```html
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
```
## Supported libraries
|Template Tag | Google | CDNJS |
|-------------|:-------:|:-------:|
|angular|:white_check_mark:|:white_check_mark:|
|chrome_frame|:white_check_mark:|:white_check_mark:|
|dojo|:white_check_mark:|:white_check_mark:|
|ext_core|:white_check_mark:|:white_check_mark:|
|jquery|:white_check_mark:|:white_check_mark:|
|jquery_ui|:white_check_mark:|:white_check_mark:|
|mootools|:white_check_mark:|:white_check_mark:|
|modernizr|:x:|:white_check_mark:|
|prototype|:white_check_mark:|:white_check_mark:|
|scriptaculos|:white_check_mark:|:white_check_mark:|
|webfont|:white_check_mark:|:white_check_mark:|
## 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
Close
Hashes for django-template-shortcuts-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd6556291c6963579351ccad8d2de5ed986f46c2fe1ed0f597a766eb0b665ea |
|
MD5 | c0908c2a74b0cd5f2ec97e411b59e25c |
|
BLAKE2b-256 | f280079637dbb27ed04d4c93b5c53910e1eb1bbd837770d24b5ca9a2ff33ed0f |