Start Django in pycharm

One is to type directly in the terminal

python manage.py runserver

What we want to introduce is that you can directly click to run:
1. If you run the manage.py program directly, a lot of things will be prompted, it is nothing more than a prompt that no parameters are passed in. Open mange.py first, and then run, a bunch of things will be prompted, indicating that there are no configuration parameters. In the upper right corner of pycharm,
click edit configurations to edit configuration parameters
. Write a picture description here
Insert picture description here

2. After clicking open, the following dialog box pops up, enter the configuration parameter runserver 0.0.0.0:8000 in the dialog box corresponding to scrip parameters. After the configuration is completed, click ok to complete.
Write picture description here
Insert picture description here

3. After configuring the above information, directly press Ctrl+shift+F10 to run the manage.py file: the following result appears, indicating that the configuration is successful.

D:\workpace\Python\PythonIDE\python.exe D:/Code/Python/Django/manage.py runserver 0.0.0.0:8000
Performing system checks…

System check identified no issues (0 silenced).

You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run ‘python manage.py migrate’ to apply them.
November 26, 2017 - 11:40:48
Django version 1.11.7, using settings ‘Django.settings’
Starting development server at http://0.0.0.0:8000/
Quit the server with CTRL-BREAK.

Note: Under windows10, runserver 0.0.0.0:8000 should be changed to 127.0.0.1:8000. The
previous part is reproduced from: https://www.cnblogs.com/callyblog/p/7898630.html

After the configuration is complete, an example of running on http://127.0.0.1:8000/ port is as follows:
Insert picture description here

Running example, running example under http://127.0.0.1:8000/admin/ address:Insert picture description here

Partly reproduced from: https://www.cnblogs.com/callyblog/p/7898630.html

Guess you like

Origin blog.csdn.net/qq_45701131/article/details/105850257