... y queries. Multiple fixes for inline forms in formsets. Multiple fixes for unique and unique_together model constraints in automatically-generated forms. Fixed support for custom callable upload_to declarations when handling file uploads through automatically ... on of autoescaping for literal strings passed to the join template filter. Previously, literal strings passed to join were automatically escaped, contrary to the documented behavior for autoescaping and literal strings . Literal strings passed to join are no ... longer automatically escaped, meaning you must now manually escape them; this is an incompatibility if you were relying on this bug, but not if ... ... comment out its line in requirements/py3.txt and continue with ./runtests.py . Tests that require pylibmc will be skipped automatically. See Running all the tests for details on installing the optional test dependencies. Running the tests requires a Django s ... .py --selenium=firefox,chrome See the selenium.webdriver package for the list of available browsers. Specifying --selenium automatically sets --tags=selenium to run only the tests that require selenium. Some browsers (e.g. Chrome or Firefox) support headless ... test code or external code included in Django). Code coverage on pull requests Django's continuous integration (CI) system automatically runs code coverage analysis on pull requests and posts a comment with a diff coverage report. This helps reviewers see whi ... ... _init__.py . When the apps.py submodule exists and defines a single AppConfig subclass, Django now uses that configuration automatically, so you can remove default_app_config . default_app_config made it possible to declare only the application's path in INST ... checks were performed. Support for colored terminal output on Windows is updated. Various modern terminal environments are automatically detected, and the options for enabling support in other cases are improved. See シンタックスカラーリング for more details. ... s nested relations. The of argument of QuerySet.select_for_update() is now allowed on MySQL 8.0.1+. Value() expression now automatically resolves its output_field to the appropriate Field subclass based on the type of its provided value for bool , bytes , flo ... ... add other sending features. During development or testing you often don't want to send email at all. Django's test runner automatically overrides the MAILERS configuration to substitute Django's memory email backend . This prevents test cases from sending re ... This can be fixed with a try - finally statement, but using the backend instance as a context manager is preferable, as it automatically calls open() and close() as needed. This is equivalent to the previous example, but uses the backend as a context manager ... e mail.mailers[...] as a context manager. with mail . mailers [ "notifications" ] as backend : # The backend connection is automatically opened inside the context. email1 = mail . EmailMessage ( "Hi" , "Message" , None , [ "to1@example.com" ]) backend . send_ ... ... 的なエスケープ To provide improved security against cross-site scripting (XSS) vulnerabilities, Django's template system now automatically escapes the output of variables. This behavior is configurable, and allows both variables and larger template constructs t ... ic relations for details. INSERT / UPDATE distinction Although Django's default behavior of having a model's save() method automatically determine whether to perform an INSERT or an UPDATE at the SQL level is suitable for the majority of cases, there are occa ... ... tain greater consistency with Python's unittest module, the new test runner ( django.test.runner.DiscoverRunner ) does not automatically support some types of tests that were supported by the previous runner: Tests in models.py and tests/__init__.py files wil ... l no longer be found and run. Move them to a file whose name begins with test . Doctests will no longer be automatically discovered. To integrate doctests in your test suite, follow the recommendations in the Python documentation . Django bund ... and all fields would be used. This can lead to security problems where fields are added to the model and, unintentionally, automatically become editable by end users. In some cases, particular with boolean fields, it is possible for this problem to be complet ... ... ts. The name of applications can be customized in the admin with the verbose_name of application configurations. The admin automatically calls autodiscover() when Django starts. You can consequently remove this line from your URLconf. Django imports all appli ... ightforward since the form can guess from the context (i.e. which method raised the exception) where the errors belong and automatically process them. This remains the canonical way of adding errors when possible. However the latter was fiddly and error-prone ... ation process easier. When you run makemessages from the root directory of your project, any extracted strings will now be automatically distributed to the proper app or project message file. See ローカライズ: 言語ファイルを作成する方法 for details. The makem ... ... () could execute callbacks multiple times ( #33410 ). Fixed a regression in Django 4.0 where help_text was HTML-escaped in automatically-generated forms ( #33419 ). Fixed a regression in Django 4.0 that caused displaying an incorrect name for class-based view ... ... ssed before the settings.configure line, this will not work. (Internally, settings is a LazyObject which configures itself automatically when the settings are accessed if it has not already been configured). So, if there is a module containing some code as fo ... visual clutter to the patches and can also occasionally cause unnecessary merge conflicts. Some IDE's can be configured to automatically remove them and most VCS tools can be set to highlight them in diff outputs. Please don't put your name in the code you co ... ... squashed migrations ( #27004 ). Fixed a regression in Client.force_login() which required specifying a backend rather than automatically using the first one if multiple backends are configured ( #27027 ). Made QuerySet.bulk_create() properly initialize model ... 2026年10月08日