Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1000 Bytes

README.md

File metadata and controls

58 lines (39 loc) · 1000 Bytes

##Installation

Install bower from npm:

$ npm install -g bower

Install django-simple-bower with pip

$ pip install django-simple-bower

Add django-simple-bower to INSTALLED_APPS in your settings:

'simplebower',

Usage

Set path to bower components (use absolute path):

BOWER_COMPONENTS_ROOT = '/PROJECT_ROOT/static/components'

Set url to bower

BOWER_COMPONENTS_URL = '/static/components'

Load bower in your template

{% load bower %}

Finally call bower components

{% bower 'css' bootstrap %}

{% bower 'js' jquery %}
{% bower 'js' bootstrap %}

HTML Output

<link rel="stylesheet" href="/static/components/bootstrap/dist/css/bootstrap.css">

<script src="/static/components/jquery/dist/jquery.js"></script>
<script src="/static/components/bootstrap/dist/js/bootstrap.js"></script>

WTFPL