Kal
Kal

Reputation: 19

How to fix errors when trying to run a server using django?

I'm trying to learn how to use Django and I have created a folder called "lecture3" and when I type in lecture3 % python manage.py runserver, I get the error

lecture3 : The term 'lecture3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 lecture3 % python manage.py runserver ~~ CategoryInfo : ObjectNotFound: (lecture3:St ring) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

Upvotes: 1

Views: 619

Answers (1)

Yuri Khristich
Yuri Khristich

Reputation: 14537

Most likely you need to execute these commands in your terminal (MacOS, Windows, Linux, all the same):

django-admin startproject lecture3
  1. It will create the folder lecture3 inside your current folder and populate the folder with a proper minimal data. Perhaps you've already done that.
cd lecture3
  1. This way you will get inside the folder lecture3
python manage.py runserver
  1. It will run the server with data from the current folder lecture3.

Upvotes: 0

Related Questions