Python Web Development (1)--New project

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

1. Create a new virtulenv

Mkvirtulenv Mxonlie

2. Installing Django under Mxonlie

Pip Install django==1.9

PS: Why not use Django 1.10 here? Because the later development process is useful to a framework, only support to Django1.9 version, the old and semi-Django1.10 version support many new features, but we do not use here, so only need to install Django 1.9 version can be

3. New Project

4. Successful creation

5, install Python-mysql Drive

6. Configure the connection to the database in code--settings.py DATABASES

7. New Database Mxonline

8. Generate Django Default database tables

Error when running manage.py

We can ignore this error and continue

Run: makemigrations command: Migrate

Run: Migrate

You can observe the database tables that Django gave us by default

9, enter the debug mode, you can break point

10. Development Server Domain name

11, run the domain name, IT worked said OK

Python Web Development (1)--New project

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.