Comparison of Django1.2.7 and 1.7.7 versions

Source: Internet
Author: User

Used to be Django1.2.7, the latest version is already 1.8, learned that the news, feel really should upgrade, the next 1.7.7 version has been upgraded, the first upgrade to the 1,7,7 version, the previous project files have not been changed, resulting in a non-normal use. So found a Chinese version of the Django1.7 document learning, before the release of the two version before there are many differences, a simple summary of the next, just self-modification can be used normally, as for 1.7.7:1.2.7 even compared to all previous versions of 1.7.7 improvements and differences, Let's still refer to the official documentation, haha.

The project directory differs:

1, Django1.7.7 will create a project directory automatically after creating a Python package with the same name as the project directory, the 1.2.7 in the project directory under the "__init__.py", "admin.py", "urls.py" three files contained in the same name of the file, and add a "wsgi.py" file.

2. After the app is created in the project directory, 1.7.7 will have more than 1.2.7 "admin.py" and "migrations" two files in the app directory.

For the two versions of the Django project directory layout, where the black file is automatically generated when the parent directory is created, the red file needs to be created by itself, and the blue Mark 1.7.7:1.2.7 more files.

Settings The different configuration files:

1. Database configuration:

Take MySQL for example:

The Database engine field (engine) shouldbe "MySQL " in 1.2.7

In 1.7.7, the Database engine field is "django.db.backends.mysql"

and 1.7.7 database configuration by default only the "ENGINE" and "NAME" field, "USER", "PASSWORD", "HOST", "PORT" fields need to add themselves.

2. Template path Configuration

The "Template_dirs" setting is present in the settings.py file in 1.2.7, and the default is an empty tuple

There is no "template_dirs" setting in the settings.py file in 1.7.7, you need to add it yourself, and you need to set it to

' Templates ')]

Comparison of Django1.2.7 and 1.7.7 versions

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.