The Django infrastructure service for Python web framework

Source: Internet
Author: User

1. Need to install Python and Django environment, installation of Python environment I'm not going to say more.

2. Installing the Framework Django

Django installation, it is recommended to install a PIP bar, Easyinstall can also, and then the terminal input:

Pip Install Django

I use the installation method is WHL installation, recommended a Wheel installation library: https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml python wheel Installation Library

Open the above URL directly Ctrl + F search Django is out and then click Download

  

3. Locate the download path for the file, enter pip install DJANGO?1.11.8?PY2.PY3?NONE?ANY.WHL in the terminal, and note that the file name after install is the same as the downloaded filename

4. Test whether the installation is successful, under Terminal:

Python

Import Django

Django. VERSION If the interface appears, the installation is successful

5. Start Building Services

1) Create a project

Find a file directory as a workspace, with the terminal into the current directory, in the terminal input: django-admin.py startproject show_goods, note show_goods for their own project name

This is the directory structure that I created after the completion:

2) Open the settings.py file, configure the local language and the time (this step can be omitted)

  

6. Test if Django can open the service successfully

The terminal command is as follows: Python manage.py Runserver Open port is 8000 by default

If the port is occupied, we can enter: Python manage.py runserver 8001

If it appears, open the Address access page and the Welcome screen will appear to run successfully

The above is the successful interface, the basic configuration service is over.

The Django infrastructure service for Python web framework

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.