GithubHelp home page GithubHelp logo

weijia / django-template-shortcuts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from comandrei/django-template-shortcuts

0.0 2.0 0.0 119 KB

Reusable Django templatetags

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

django-template-shortcuts's Introduction

django-template-shortcuts

Build Status Latest Version Downloads

Remove boilerplate code when including JS and CSS files hosted by popular CDNs.

Index

Instalation

Via pip:

    pip install django-template-shortcuts

Via easy_install:

    easy_install django-template-shortcuts

Clonning the project:

    $ git clone git://github.com/comandrei/django-template-shortcuts.git
    $ python django-template-shortcuts/setup.py install

Add the app to your installed apps:

    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>

Supported libraries

Template Tag Google CDNJS
angular
chrome_frame
dojo
ext_core
jquery
jquery_ui
mootools
modernizr
prototype
scriptaculos
webfont

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.

django-template-shortcuts's People

Contributors

comandrei avatar weijia avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.