cookiecutter-django/hooks/pre_gen_project.py

5 lines
167 B
Python
Raw Normal View History

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