pythondjangogulpgulp-livereload

Is it possible to configure Gulp Livereload for Django?


I would like to use gulp-liveReload with Django, is it possible? I have read that there is an alternative for Grunt, but I would prefer work with Gulp, it is easier for me.

Thanks,


Solution

  • I wrote up how to do it in a recent blog post here:

    http://www.revsys.com/blog/2014/oct/21/ultimate-front-end-development-setup/

    Basically you just need to write gulp tasks that watch what files you want to trigger livereloads, so for me that's templates:

    /* Trigger a live reload on any Django template changes */
    gulp.watch('**/templates/**').on('change', livereload.changed);
    

    But you could also trigger it on models.py, views.py, or anything else you want really.