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.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 241f2699af475c12a2fe7157b839b0bec0e6e3fd46b5b554a8d2265d01806368 |
|
MD5 | 6d7d6561911894e85224dbacc801bfcb |
|
BLAKE2b-256 | 556ed91f534a21f95d25cfde99c33683cc9775c2db15ac414f00a653970fac5b |