Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Installing frontend Django dependencies via bower.

Project description

https://api.travis-ci.org/Celc/jack-bower.png?branch=master https://coveralls.io/repos/Celc/jack-bower/badge.png?branch=master https://pypip.in/v/jack-bower/badge.png https://pypip.in/d/jack-bower/badge.png

Installing frontend Django dependencies via bower.

Installation

To get the latest stable release from PyPi

pip install jack-bower

To get the latest commit from GitHub

pip install -e git+git://github.com/Celc/jack-bower.git#egg=bower

Add bower to your INSTALLED_APPS

INSTALLED_APPS = (
    ...,
    'bower',
)

Usage

Use ./manage.py bower_init <app_name> to bootstrap an app with .bowerrc, bower.json and .gitignore. Add your dependencies to bower.json

{
    "dependencies": {
        "backbone": "1.0.0",
        "underscore": "1.4.4"
    }
}

Then just run ./manage.py bower_install and it’ll install all the dependencies in all the INSTALLED_APPS apps that has a bower.json. Default install path is static/bower_components/<library>, you can edit .bowerrc to change that.

Use like normal in templates:

{% load staticfiles %}
{% static 'components/bootstrap/bootstrap.js'%}

Contribute

If you want to contribute to this project, please perform the following steps:

# Fork this repository
# Clone your fork
mkvirtualenv -p python2.7 jack-bower
npm install -g bower
make develop

git add . && git commit
# Send us a pull request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jack-bower, version 0.1.8
Filename, size File type Python version Upload date Hashes
Filename, size jack-bower-0.1.8.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page