cookiecutter-django/hooks/pre_gen_project.py

7 lines
184 B
Python
Raw Normal View History

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