Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Serve Coffeescript from your Django templates
Python
tree: 530aee0cde

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
cafe
tests
.gitignore
README.markdown
setup.py

README.markdown

Django Cafe

Django cafe is a way to integrate Coffeescript within your Django application.

Simple Example

{% load coffee %}
<script src="{% coffee spam.coffee %}"/>

Multiple Files

<script src="{% coffee foo.coffee bar.coffee %}"/>

Install

`pip install https://github.com/joshbohde/django-cafe/tarball/master`

Setup

Make sure cafe is in your installed app, like so. You'll also need to have a working installation of Coffeescript.

INSTALLED_APPS = (
  ...
  "cafe", 
  ...      
) 

Settings

CAFE_ROOT

Default: MEDIA_ROOT

The location of the .coffee files.

CAFE_OUTPUT_DIR

Default: compiled

The location within the CAFE_ROOT to store the compiled .js files.

COFFEE_BIN

Default: "coffee"

The Coffeescript executable.

COFFEE_PARAMS

Default: "-cj"

The parameters sent to the Coffeescript compiler.

Something went wrong with that request. Please try again.