Let's verify that your Django project is working. If you do not have an external mysite directory, go to this directory and run the following command:
$ python manage.py runserver
You will see the following output on the command line:
Performing system checks ... 0 Errors Foundmay, 2015-15:50:53django version 1.8, using Settings ' mysite.settings ' starting development Server at HT Tp://127.0.0.1:8000/quit the server with Control-c.
This indicates that you have started the Django Development server, a lightweight Web server written in pure python. We built it in Django so you can quickly develop a product without configuring a server for the production environment-for example, apache---until you're ready to make a production environment.
now is a good time to explain this: do not use this server in any environment that is similar to a production environment. It's just for use in development. (our focus is to write a web framework, not a Web server.) )
now that the server is running, please use your browser to access http://127.0.0.1:8000/. you will see a "Welcome to Django" page in the light blue background. It's running!
Change port
By default, therunserver command starts the development server on port 8000 of the internal IP.
If you want to change the port of the server, pass the port you want to use as a command-line parameter to it. For example, this command starts the server on port 8080:
$ python manage.py runserver 8080
If you want to change the IP address of the server, put the IP address and port number together. So to listen to all the extranet IPs, use (useful if you want to show your work on another computer):
$ python manage.py runserver 0.0.0.0:8000
All documentation for the development server can be found in the runserver reference Manual.
Automatic overloading of runserver
The development server automatically re-loads Python code as needed. You do not have to restart the server in order for the changed code to take effect. However, some behaviors, such as adding files, do not trigger a restart of the server, so in this case you will need to restart the server manually.
Use of the Django Development server