Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you run a Django development server at the command prompt? [closed]

Tags:

python

django

trying to run the development server as directed by the django book 2.0. Heres what im doing so far:

1) cd into the directory containing python 2) run the python interpreter using the "python" command 3) Import django with the python interpreter http://www.djangobook.com/en/2.0/chapter02/

Now step 4 should be cd into the mysite directory and then run the command "python manage.py runserver"

My question though is how do you cd into another directory while the python interpreter in running in the command prompt so i can use the command to run the development server?

If somebody could just list step by step as to how they run the development server from the command prompt or explain to me what im doing wrong, it would be very much appreciated as i have been trying to figure this out forever.

Btw directories i change to in order "Python27>mysite". mysite is in the Python 27 folder. Python 27 contains the python files which includes the python.exe file and mysite contains the project which include manage.py file.

like image 202
j5r Avatar asked Nov 28 '22 03:11

j5r


1 Answers

Change in your django project and run:

python manage.py runserver

that's all!

like image 162
programmersbook Avatar answered May 20 '23 19:05

programmersbook