... ied, follow PEP 8 . Use flake8 to check for problems in this area. Note that our .flake8 file excludes some errors that we don't consider as gross violations. Remember that PEP 8 is only a guide, so respect the style of the surrounding code as a prima ... including error and logging messages. In general format() is more verbose, so the other formatting methods are preferred. Don't waste time doing unrelated refactoring of existing code to adjust the formatting method. Avoid use of "we" in comments, e. ... value, not the truthiness of the expression. In test docstrings, state the expected behavior that each test demonstrates. Don't include preambles such as "Tests that" or "Ensures that". Reserve ticket references for obscure issues where the ticket ha ... ... ied, follow PEP 8 . Use flake8 to check for problems in this area. Note that our .flake8 file excludes some errors that we don't consider as gross violations. Remember that PEP 8 is only a guide, so respect the style of the surrounding code as a prima ... including error and logging messages. In general format() is more verbose, so the other formatting methods are preferred. Don't waste time doing unrelated refactoring of existing code to adjust the formatting method. Avoid use of "we" in comments, e. ... value, not the truthiness of the expression. In test docstrings, state the expected behavior that each test demonstrates. Don't include preambles such as "Tests that" or "Ensures that". Reserve ticket references for obscure issues where the ticket ha ... ... ty ¶ Once you've claimed a ticket, you have a responsibility to work on that ticket in a reasonably timely fashion. If you don't have time to work on it, either unclaim it or don't claim it in the first place! If there's no sign of progress on a parti ... cket and it's taking a long time (days or weeks) to code, keep everybody updated by posting comments on the ticket. If you don't provide regular updates, and you don't respond to a request for a progress report, your claim on the ticket may be revoked ... the case of small changes, such as typos in the documentation or small bugs that will only take a few minutes to fix, you don't need to jump through the hoops of claiming tickets. Submit your changes directly and you're done! It is always acceptable, ... ... ty ¶ Once you've claimed a ticket, you have a responsibility to work on that ticket in a reasonably timely fashion. If you don't have time to work on it, either unclaim it or don't claim it in the first place! If there's no sign of progress on a parti ... cket and it's taking a long time (days or weeks) to code, keep everybody updated by posting comments on the ticket. If you don't provide regular updates, and you don't respond to a request for a progress report, your claim on the ticket may be revoked ... the case of small changes, such as typos in the documentation or small bugs that will only take a few minutes to fix, you don't need to jump through the hoops of claiming tickets. Submit your changes directly and you're done! It is always acceptable, ... ... vered in their own documentation , but a few of the key features are: syncdb has been deprecated and replaced by migrate . Don't worry - calls to syncdb will still work as before. A new makemigrations command provides an easy way to autodetect changes ... ir configuration. Application labels are assigned correctly to models even when they're defined outside of models.py . You don't have to set app_label explicitly any more. It is possible to omit models.py entirely if an application doesn't have any mo ... rse by name. It also removes the ability for visitors to generate spurious HTTP 500 errors by requesting static files that don't exist or haven't been collected yet. The django.db.models.Model.__eq__() method is now defined in a way where instances of ... ... vered in their own documentation , but a few of the key features are: syncdb has been deprecated and replaced by migrate . Don't worry - calls to syncdb will still work as before. A new makemigrations command provides an easy way to autodetect changes ... ir configuration. Application labels are assigned correctly to models even when they're defined outside of models.py . You don't have to set app_label explicitly any more. It is possible to omit models.py entirely if an application doesn't have any mo ... rse by name. It also removes the ability for visitors to generate spurious HTTP 500 errors by requesting static files that don't exist or haven't been collected yet. The django.db.models.Model.__eq__() method is now defined in a way where instances of ... ... otection . An updated default project layout and manage.py that removes the "magic" from prior versions. And for those who don't like the new layout, you can use custom project and app templates instead! Support for in-browser testing frameworks (like ... estCase subclass of unittest.TestCase that's lighter than django.test.TestCase and company. It can be useful in tests that don't need to hit a database. See Django ユニットテストクラスの階層 . Backwards incompatible changes in 1.4 ¶ SECRET_KEY setting ... BLE_404_STARTS re . compile ( r "^<prefix>" ), # for each <suffix> in IGNORABLE_404_ENDS re . compile ( r "<suffix>$" ), ) Don't forget to escape characters that have a special meaning in a regular expression, such as periods. CSRF protection extended ... ... otection . An updated default project layout and manage.py that removes the "magic" from prior versions. And for those who don't like the new layout, you can use custom project and app templates instead! Support for in-browser testing frameworks (like ... estCase subclass of unittest.TestCase that's lighter than django.test.TestCase and company. It can be useful in tests that don't need to hit a database. See Django ユニットテストクラスの階層 . Backwards incompatible changes in 1.4 ¶ SECRET_KEY setting ... BLE_404_STARTS re . compile ( r "^<prefix>" ), # for each <suffix> in IGNORABLE_404_ENDS re . compile ( r "<suffix>$" ), ) Don't forget to escape characters that have a special meaning in a regular expression, such as periods. CSRF protection extended ... ... r site. Django 1.5 is also the first release with Python 3 support ! We're labeling this support "experimental" because we don't yet consider it production-ready, but everything's in place for you to start porting your apps to Python 3. Our next relea ... 1.5 introduces support for Python 3 - specifically, Python 3.2 and above. This comes in the form of a single codebase; you don't need to install a different version of Django on Python 3. This means that you can write applications targeted for just Py ... ... es framework no longer is. clickjacking prevention is now on and the database defaults to SQLite. If the default templates don't suit your tastes, you can use custom project and app templates . Improved transaction management ¶ Django's transaction ma ... vent the text from appearing in cases where it wasn't applicable such as form fields that implement user interactions that don't involve a keyboard and/or a mouse. Starting with Django 1.6, as an ad-hoc temporary backward-compatibility provision, the ... gs, **kwargs ). Any unnamed captured group will now be passed to get_redirect_url() which may result in a TypeError if you don't update the signature of your custom method. Features deprecated in 1.6 ¶ Transaction management APIs ¶ Transaction managem ... 2026年10月08日