While I am trying to create a new project in Django I got this error
command used : django-admin startproject test-service
'test-service' is not a valid project name. Please make sure the name is a valid identifier.
Then I tried with django-admin startproject test_service and it is working. Can you please confirm whether i can use dash in project name. I am planning to do a uniq naming convention for upcoming projects also.
No, you cannot use a hyphen in the project or app name passed to startproject
or startapp
.
The name must be a valid identifier, this is verified by calling the function str.isidentifier
. The Python docs contain the definition of a valid identifier here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With