Check to confirm that the user has a modern version of Cookiecutter.

This commit is contained in:
Daniel Roy Greenfeld 2016-04-25 14:09:37 -07:00
parent 8992bc4f70
commit a783828ce7
2 changed files with 8 additions and 0 deletions

View File

@ -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)

View File

@ -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'