Home > Blockchain >  Manage.py unknown command
Manage.py unknown command

Time:02-03

I am a student and my profesor needs me to install Django on PyCharm.

I made a big folder called PyCharmProjects and it includes like everything I have done in Python.

The problem is that I made a new folder inside this PyCharmProjects called Elementar, and I need to have the Django folders in there but it's not downloading.

I type in the PyCharm terminal django-admin manage.py startproject taskmanager1 (this is how my profesor needs me to name it)

After I run the code it says:

No Django settings specified. Unknown command: 'manage.py' Type 'django-admin help' for usage.

I also tried to install it through the MacOS terminal but I don't even have acces the folder named Elementar (cd: no such file or directory: Elementar) although it is created and it is seen in the PyCharm.

CodePudding user response:

Manage.py its python file after you start your project, you cant call this file until this command:

django-admin startproject mysite

Then run:

python manage.py runserver

And if you want apps in your project run:

python manage.py startapp my_app

CodePudding user response:

First of all, you can't create a project using manage.py because the manage.py file doesn't exist yet. It will be created automatically in the folder taskmanager1 if you run the command below.

You can create a project with the command django-admin startproject taskmanager1

After that you can change the directory to the taskmanager1 folder with the cd taskmanager/ command.

When you changed the directory you can use the python manage.py commando for example if you want to run your migrations or creating an app. python manage.py migrate

  • Related