mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-14 01:52:26 +03:00
strip dots in default project_slug (#1865)
This removes periods from the auto-generated project_slug (and also runs trim for good measure). Otherwise if you have a "." in your project name (e.g., you used a website domain name as your project name), you will encounter an error about it failing for a `project_slug.isidentifier()` check. Update: changed "." to be replace with "_" instead of "", per request from @webyneter
This commit is contained in:
parent
c6fd1c1905
commit
4e39a9f8f0
|
@ -144,6 +144,7 @@ Listed in alphabetical order.
|
||||||
Pablo `@oubiga`_
|
Pablo `@oubiga`_
|
||||||
Parbhat Puri `@parbhat`_
|
Parbhat Puri `@parbhat`_
|
||||||
Peter Bittner `@bittner`_
|
Peter Bittner `@bittner`_
|
||||||
|
Peter Coles `@mrcoles`_
|
||||||
Pierre Chiquet `@pchiquet`_
|
Pierre Chiquet `@pchiquet`_
|
||||||
Raphael Pierzina `@hackebrot`_
|
Raphael Pierzina `@hackebrot`_
|
||||||
Raony Guimarães Corrêa `@raonyguimaraes`_
|
Raony Guimarães Corrêa `@raonyguimaraes`_
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"project_name": "My Awesome Project",
|
"project_name": "My Awesome Project",
|
||||||
"project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_') }}",
|
"project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_')|replace('.', '_')|trim() }}",
|
||||||
"description": "Behold My Awesome Project!",
|
"description": "Behold My Awesome Project!",
|
||||||
"author_name": "Daniel Roy Greenfeld",
|
"author_name": "Daniel Roy Greenfeld",
|
||||||
"domain_name": "example.com",
|
"domain_name": "example.com",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user