... ォルトでは、 LOGGING 設定は、以下のスキームを使って Django のデフォルトロギング設定 に統合されています。 LOGGING の disable_existing_loggers キーの値を True にすると、全てのデフォルトの設定が無効になります(キーが存在しない場合は dictConfig のデフォルトに ... なります)。このため、 'disable_existing_loggers': True を使う場合は注意してください。 True を設定する必要は殆どないでしょう。 disable_existing_loggers を False に ... メッセージをコンソールに出力するための最低限の設定がこちらです。 settings.py import os LOGGING = { "version" : 1 , "disable_existing_loggers" : False , "handlers" : { "console" : { "class" : "logging.StreamHandler" , }, }, "root" : { "handlers" : [ "conso ... ... databases, including pagination support for GIS QuerySets, more efficient slicing of results and improved introspection of existing databases. Several fixes for query support in the Django object-relational mapper, including repeated setting and resettin ... upports by default. And as always, a large number of improvements to Django's documentation, including both corrections to existing documents and expanded and new documentation. ... ... ことによって、私たちは Django を完全な非同期処理が可能なフレームワークに作り変える旅を始めます。 This is in addition to our existing WSGI support. Django intends to support both for the foreseeable future. Async features will only be available to applicat ... dded BaseBackend class to ease customization of authentication backends. Added get_user_permissions() method to mirror the existing get_group_permissions() method. Added HTML autocomplete attribute to widgets of username, email, and password fields in dj ... ry key value equivalent to passing force_insert=True to model's save() . Attempts to use a new Model instance to update an existing row will result in an IntegrityError . In order to update an existing model for a specific primary key value, use the upda ... ... C, use timezone-aware objects internally, and translate them to users' local timezones for display. If you're upgrading an existing project to Django 1.4, switching to the timezone aware mode may take some care: the new mode disallows some rather sloppy ... Time zone support is enabled by default in new projects created with startproject . If you want to use this feature in an existing project, read the migration guide . If you encounter problems, there's a helpful FAQ . Support for in-browser testing fram ... y just like with regular formsets. However, initial values only apply to extra forms, i.e. those which are not bound to an existing model instance. The sitemaps framework can now handle HTTPS links using the new Sitemap.protocol class attribute. A new dj ... ... ing argument replaces the earlier connection in Django functions that send email. This guide provides details on migrating existing projects to the new mailers functionality. All Django projects that send email should: If using any third-party packages t ... end_mail() , send_mass_mail() , mail_admins() , mail_managers() , and EmailMessage.send() can be replaced in several ways. Existing usage seems to have several different expectations for the behavior, many of which don't match the actual (and email backe ... cept OSError: pass . Note that this ignores both transient network glitches and SMTP configuration problems (just like the existing SMTP email backend fail_silently implementation). To ignore end user typos in to addresses and other delivery problems, re ... ... hould be fairly simple and should not require major changes to existing applications. However, we're also releasing 0.96 now because we have a set of backwards-incompatible changes scheduled for ... so they are not always visible. The effect of this change is that running manage.py reset and similar commands against an existing database may generate SQL with the new form of constraint name, while the database itself contains constraints named in th ... cuting it. Examine the output of manage.py sqlall to see the new-style constraint names, and use that as a guide to rename existing constraints in your database. Name changes in manage.py A few of the options to manage.py have changed with the addition o ... ... tch modes: FETCH_ONE , the default, fetches the missing field for the current instance only. This mode represents Django's existing behavior. FETCH_PEERS fetches a missing field for all instances that came from the same QuerySet . This mode works like an ... handle deletion logic entirely within the database, using the SQL ON DELETE clause. They are thus more efficient than the existing Python-level options, as Django does not need to load objects before deleting them. As a consequence, the DB_CASCADE optio ... e signals. Mailers The new MAILERS setting supports configuring multiple email backends with different options, similar to existing mechanisms for CACHES , DATABASES , STORAGES , and TASKS : MAILERS = { "default" : { "BACKEND" : "django.core.mail.backend ... ... s been fixed and to prevent the problem from arising again. If the code adds a new feature, or modifies the behavior of an existing feature, the change should also contain documentation. When you think your work is ready to be reviewed, send a GitHub pul ... e community. The new feature ideas tracker If you have an idea for a new feature, please create a new proposal (or join an existing discussion) following the process for suggesting new features . You should explain the need for the change, go into detail ... _prefixes (), ) old_private_helper () ... Finally, there are a couple of updates to Django's documentation to make: If the existing feature is documented, mark it deprecated in documentation using the .. deprecated:: A.B annotation. Include a short descr ... ... autocommit is now turned on by default. This makes transaction handling more explicit and should improve performance. The existing APIs were deprecated, and new APIs were introduced, as described in the transaction management docs . Persistent database ... SELECT was performed to determine if UPDATE or INSERT were needed. The new algorithm needs only one query for updating an existing row while the old algorithm needed two. See Model.save() for more details. In some rare cases the database doesn't report ... iteration count for the PBKDF2 password hasher has been increased by 20%. This backwards compatible change will not affect existing passwords or users who have subclassed django.contrib.auth.hashers.PBKDF2PasswordHasher to change the default value. Passw ... ... box to clear the field's value (if the field has a value and is not required); FileInput provided no means for clearing an existing file from a FileField . ClearableFileInput is now the default widget for a FileField , so existing forms including FileFie ... plement behavior that makes the handling of the first argument consistent with the handling of all other variables. So, an existing template that contains: {% url sample %} should be replaced with: {% load url from future %} {% url 'sample' %} The tags i ... ango 1.5, the old behavior will be replaced with the new behavior. To ensure compatibility with future versions of Django, existing templates should be modified to use the new future libraries and syntax. Changes to the login methods of the admin In prev ... 2026年10月08日