I wrote an article on my personal blog called Adding pre-commit hooks to a Django project. Check it out!