Django-Getting Started: Download and project generation, django-getting started
Django is one of the most popular frameworks for python web application development. Today, I will introduce some of django's getting started knowledge.
To use the pycharm tool, you must first have django.
1. Download django
-- Pip install django = 1 *
-- Python-m pip install django = 1 * (if the first download fails, try the second one)
2. Create a django Project
-- Run the command D: \ pyspace \ web in the work domain to directly jump to the directory.
-- Enter "django-admin startproject myproject" in the doscommand.
Generate
3. Run the cd myproject command to enter the project (for example) and run the project.
-- Python manage. py runserver
After running, the following error occurs: Django version 1.11.11, using settings 'blog. settings'
Starting development server at http: // 127.0.0.1: 8000/
Quit the server with CTRL-BREAK. (default server address: http: // 127. 0 .. 0.1: 8000 /)
It also generates
4. Enter http: // 127.0.0.1: 8000/(or use localhost: 8000) in the browser to access the project.
5. Create an application
-- Python manage. py startapp myhome (myhome is the application name defined)
In this case
In The myhome folder
The next article will introduce the compilation and design of the demo in the project ('mvt ').