Question

I'm a new developer on Django and I want to use some CoffeeScript in my dummy project. However, documentation about this topic isn't good and I want to know from the experts which is the best option.

I was looking at possibilities like compressor but it is still confused. I'd really appreciate some pieces of advice.

Thanks in advance.

Was it helpful?

Solution

For automatic compilation, there's django-coffeescript. For a more complete toolchain (a bit like Rails Sprockets) there's Gears, a stand-alone project with plugins for Django, Flask or compilation on the command line.

When I've used CoffeeScript with Django however, I've mostly preferred to set up compilation as a part of a build process (great to have one in any case), there I mostly used custom Paver scripts together with directory watching tools (like watchdog/kicker) to compile .coffee files to Javascript and putting them in my static directory.

OTHER TIPS

What exactly is your question? Django will let you use any JS libary you want. Just add it your HTML pages or templates as you would do without Django. If it is about serving of staticfiles, check this: https://docs.djangoproject.com/en/1.4/ref/contrib/staticfiles/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top