cookiecutter-django/hooks/pre_gen_project.py

9 lines
295 B
Python
Raw Normal View History

import cookiecutter
2016-04-20 21:41:17 +03:00
project_slug = '{{ cookiecutter.project_slug }}'
2016-04-20 21:41:17 +03:00
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'