... エラルキーがわかりやすく紹介されています。 シンプルなジェネリックビュー View class View 属性 (とオプションのアクセサ): http_method_names メソッド as_view() dispatch() head() http_method_not_allowed() setup() TemplateView class TemplateView 属性 (とオプシ ... ョンのアクセサ): content_type extra_context http_method_names response_class [ render_to_response() ] template_engine template_name [ get_template_names() ] メソッド as_view() di ... spatch() get() get_context_data() head() http_method_not_allowed() render_to_response() setup() RedirectView class RedirectView 属性 (とオプションのアクセサ): http_method_name ... ... e respectively. These new signals have slightly different arguments. Check the documentation for details. The allow_syncdb method on database routers is now called allow_migrate , but still performs the same function. Routers with allow_syncdb methods ... will still work, but that method name is deprecated and you should change it as soon as possible (nothing more than renaming is required). initial_data fix ... s. Improvements thus far include: Applications can run code at startup, before Django does anything else, with the ready() method of their configuration. Application labels are assigned correctly to models even when they're defined outside of models.py ... ... mprovements. Tests are now run within two nested atomic() blocks: one for the whole class and one for each test. The class method TestCase.setUpTestData() adds the ability to set up test data at the class level. Using this technique can speed up the te ... w performed once for the whole TestCase . マイナーな機能 django.contrib.admin ModelAdmin now has a has_module_permission() method to allow limiting access to the module on the admin index page. InlineModelAdmin now has an attribute show_change_link tha ... rol whether or not the full count of objects should be displayed on a filtered admin page. The AdminSite.password_change() method now has an extra_context parameter. You can now control who may login to the admin site by overriding only AdminSite.has_p ... ... mpatible changes, detailed in CSRF Protection , below. Authors of custom Field subclasses should be aware that a number of methods have had a change in prototype, detailed under get_db_prep_*() methods on Field , below. The internals of template tags h ... required() , and permission_required() , decorators from django.contrib.auth only apply to functions and no longer work on methods. There's a simple one-line fix detailed below . Again, these are just the big features that will affect the most users. U ... bility to use more than one database in your Django project. Queries can be issued at a specific database with the using() method on QuerySet objects. Individual objects can be saved to a specific database by providing a using argument when you call sa ... ... ニア語の文字をサポートするようになりました。 django.contrib.admindocs The model section of the admindocs now also describes methods that take arguments, rather than ignoring them. django.contrib.auth The default iteration count for the PBKDF2 password h ... tial index の作成や reprojection をサポートします。spatial querying はまだサポートしていません。 The new GDALRaster.warp() method allows warping a raster by specifying target raster properties such as origin, width, height, or pixel size (among others) ... . The new GDALRaster.transform() method allows transforming a raster into a different spatial reference system by specifying a target srid . 新しい GeoIP2 クラスが ... ... ase.html template now has a new block header which contains the admin site header. The new ModelAdmin.get_formset_kwargs() method allows customizing the keyword arguments passed to the constructor of a formset. The navigation sidebar now has a quick fi ... bar. The new context variable model which contains the model class for each model is added to the AdminSite.each_context() method. The new ModelAdmin.search_help_text attribute allows specifying a descriptive text for the search box. The InlineModelAdm ... レーション回数が 260,000 から 320,000 に増加しました。 The new LoginView.next_page attribute and get_default_redirect_url() method allow customizing the redirect after login. django.contrib.gis Added support for SpatiaLite 5. GDALRaster now allows creat ... ... dFetchBlocked exception. This mode can prevent unintentional queries in performance-critical sections of code. Use the new method QuerySet.fetch_mode() to set the fetch mode for model instances fetched by the QuerySet : from django.db import models boo ... tting USE_BLANK_CHOICE_DASH allows you to revert back to the old default label. FilePathField now provides a set_choices() method to scan the directory at path and refresh the field's choices. This allows per-request refreshing when called in a form's ... __init__() . ジェネリックビュー (汎用ビュー) The new RedirectView.preserve_request attribute allows preserving the HTTP method and body during redirects, using 307/308 status codes instead of 302/301. 管理コマンド Management commands now set Argumen ... ... nd required more manual handling of message structure and encoding. Notably, the return type of the EmailMessage.message() method is now an instance of Python's email.message.EmailMessage . This supports the same API as the previous SafeMIMEText and Sa ... ow supports keyword arguments with names that are not valid Python identifiers. モデル Constraints now implement a check() method that is already registered with the check framework. The new order_by argument for Aggregate allows specifying the orderin ... into a string, separated by the delimiter string. This aggregate was previously supported only for PostgreSQL. The save() method now raises a specialized Model.NotUpdated exception, when a forced update results in no affected rows, instead of a generi ... ... e so that the message can be dynamically translated using the current active language. A new LogEntry.get_change_message() method is now the preferred way of retrieving the change message. Selected objects for fields in ModelAdmin.raw_id_fields now hav ... on of all the elements of this geometry. Added the GEOSGeometry.covers() binary predicate. Added the GDALBand.statistics() method and mean and std attributes. Added support for the MakeLine aggregate and GeoHash function on SpatiaLite. Added support fo ... the properties dictionary if specific fields aren't specified. The ability to replicate input data on the GDALBand.data() method was added. Band data can now be updated with repeated values efficiently. Added database functions IsValid and MakeValid , ... ... SALT_FALLBACK transitional setting will be removed. The Field.get_placeholder_sql shim over the deprecated get_placeholder method will be removed. The SQLCompiler.quote_name_unless_alias() method will be removed. The EMAIL_BACKEND , EMAIL_FILE_PATH , E ... ass will become unsupported, and the class documentation for that backend will be removed. The BaseEmailBackend.__init__() method will raise errors for unknown keyword arguments and will remove support for fail_silently . The email_backend argument of ... sed with its list_select_related attribute set to True . ModelAdmin will raise ValueError if its get_list_select_related() method returns True . Support for overriding ModelAdmin.get_actions() without the new action_location parameter will be removed. ... 2026年10月08日