Django Learning Notes Day One

Source: Internet
Author: User
Tags install django pip install django virtual environment virtualenv

time:2016 January 01 21:38:55

Description:

From today onwards I began to write my Django study notes, because there are too many cluttered articles on the web, not a system, there are too many training institutions to tell things too simple, no in-depth explanation Django, is a small note of their own it, The main reference is Django1.8 official documents, Address: www.djangoproject.com, opinion, big God do not spray!

Content:

Day one. First exploration of Django?

In the course of web development, we often encounter the problem of writing repetitive code, and Django's appearance solves the problem of repeating "making wheels", and Django was developed in a fast-paced newsroom, so it was designed to solve the web development framework faster and more efficiently.

How do we install Django?

Because the PC used by the author is basically OS X OS, this anthology is basically based on OS X production environment.

There are many ways to install Django, and the author uses a more concise and official default installation method, which is installed using the PIP management tool. "command:pip Install django==1.8.2"

Of course, when we were doing Django Web development, the older generation showed us a way to use the tool "virtualenv", one of the three great artifacts of Python. The advantage of using this tool is that we encounter a variety of development environment versions in our production environment, and we use virtualenv to solve the problem well. "command:pip Install virtualenv"

Create virtualenv directory, "command:virtualenv--no-site-packages project_folder" project_folder for the virtual environment directory you want to create

Activating Virtualenv,"command:source project_folder/bin/activate"

Exit virtualenv,"command:deactivate"

View the package files for the current virtual directory installation, "command:pip list"

Friendship Link:

Django Official website: https://www.djangoproject.com/

Django Learning Notes Day One

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.