cookiecutter-django/hooks/pre_gen_project.py
2016-04-20 10:00:35 -07:00

5 lines
170 B
Python

repo_name = '{{ cookiecutter.project_slug }}'
if hasattr(repo_name, 'isidentifier'):
assert repo_name.isidentifier(), 'Repo name should be valid Python identifier!'