Static files setup

Installing LESS Preprocessor

  1. Install Node.js for vagrant users

    • Install prerequisites:

      ~$ sudo apt-get install g++ libssl-dev build-essential
    • Download latest Node.js source code (eg.):

      ~$ wget
    • Extract source code:

      ~$ tar -zxf node-v0.10.20.tar.gz
    • To build Node.js, run inside the extracted folder:

      ~$ ./configure
      ~$ make
      ~$ sudo make install


    For other development environments (eg. virtualenv), follow the Node.js installation guide or use your package manager if a package is available.

  2. Install lessc using npm:

    ~$ sudo npm install -g less



If set to True django serves static files compressed.


If set to True static files will be compressed outside request/response loop. If set to False static files will be processed on user requests.