I'm on windows and trying to create a new app inside a common folder named Apps. The myApp folder already exists inside Apps. I'm running from the project root:
python manage.py startapp myApp Apps\myApp
and I get:
Error: 'Apps\\myApp' is not a valid app name. Please use only numbers, letters and underscores.
I don't know why that double backslash. I tried also with a forward slash just to be sure:
python manage.py startapp myApp Apps/myApp
and I get this:
Error: 'myApp' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.
I can't understand if it is a Windows or a Python problem.
Try this:
mkdir Apps\newapp
python manage.py startapp NewApp Apps/newapp
And you will to create a app called "NewApp" inside folder "Apps/newapp".
Create your Apps directory from your project's root directory-
mkdir Apps
Move to your Apps directory-
cd Apps
Run python by calling the manage.py in your root project directory-
python ../manage.py startapp newapp
There you go
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