diff --git a/CHANGELOG.md b/CHANGELOG.md index ca37f5c45..97422f96a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### [2016-04-25] +### Added +- Check to confirm that the user has a modern version of Cookiecutter. (@pydanny) + ### [2016-04-20] ### Changed - Default to today's date in cookiecutter.json. (@audreyr) diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 83b726498..3dfc190a2 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -1,4 +1,8 @@ +import cookiecutter + project_slug = '{{ cookiecutter.project_slug }}' if hasattr(project_slug, 'isidentifier'): assert project_slug.isidentifier(), 'Project slug should be valid Python identifier!' + +assert cookiecutter.__version__ > '1.3.0', 'Please upgrade your Cookiecutter installation'