Django Learning Manual-Pycharm Install/build first website Hello World

Source: Internet
Author: User
Tags django server

Steps elaborated:

1. Download the Pycharm installation package, install the Pycharm

2. Open Pycharm software, new project

3. Create new app, configure URL, start Project

Step 1:

Pycharm website Download:

https://www.jetbrains.com/pycharm/

Installation method is consistent with common Windows software installation method, we recommend specifying the installation path.

Step 2:

Configuring Pycharm Software

1. Before creating a project catalog, it is also possible to configure the interpreter (and, of course, to create a Django project directly by default, but the subsequent loading of new projects will not load, so we recommend that you configure the specified interpreter first.) )

    

Files-default configuration

    

Project Interpreter-add

    

Select Systerm interpreter and then select the Python installation directory file to confirm!!!

    

Select the python that we just added here we also see the Django module that we previously installed in the Python document.

    

In the new Django directory before the Pytz This module must be added or in the establishment of the project will be an error after the start!!!

    

If not installed, you can press +.

    

Enter Pytz in the search box to install it by clicking the install package. (if not installed please download the corresponding module installation or PIP mode installation.) )

################################################################################################

Formally created the Python project.

  

FILE-New Project

Select the Django project to specify the project path and the project name to generate by create.

  

Edit Structure

  

Press + to select the Django server

  

Startup mode configuration

Step 3: Create an App

  

Pycharm lower left corner select Terminal

  

Create a business APP01 document

  

Create a new index.html page in templates write

Configure ULRS, import URLs and views, add URL entries, note the comma behind!!!!!

  

App01 Edit views Add def Index function

  

Press the green triangle start point to open the connection 127.0.0.1:8000

Add index after the link to see the index page you edited earlier.

  

  

Django Learning Manual-Pycharm Install/build first website Hello World

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.