Django-Getting Started: Download and project generation, django-getting started

Source: Internet
Author: User
Tags install django pip install django

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 ').

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.