... チェンジリストページで選択されたオブジェクトのリストで呼び出される関数です。 Django には、すべてのモデルで利用可能な "delete selected objects" アクションが同梱されています。たとえば、これは Django 組み込みの django.contrib.auth アプリの user モジュールです ... より良い、人にやさしい名前をつけることができます: from django.contrib import admin ... @admin . action ( description = "Mark selected stories as published" ) def make_published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) 注釈 こ ... 次のようになります: from django.contrib import admin from myapp.models import Article @admin . action ( description = "Mark selected stories as published" ) def make_published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) class A ... ... チェンジリストページで選択されたオブジェクトのリストで呼び出される関数です。 Django には、すべてのモデルで利用可能な "delete selected objects" アクションが同梱されています。たとえば、これは Django 組み込みの django.contrib.auth アプリの user モジュールです ... より良い、人にやさしい名前をつけることができます: from django.contrib import admin ... @admin . action ( description = "Mark selected stories as published" ) def make_published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) 注釈 こ ... 次のようになります: from django.contrib import admin from myapp.models import Article @admin . action ( description = "Mark selected stories as published" ) def make_published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) class A ... ... crashed due to mismatching columns ( #29229 ). Fixed a regression in Django 1.11 where an empty choice could be initially selected for the SelectMultiple and CheckboxSelectMultiple widgets ( #29273 ). 目次 Django 1.11.12 リリースノート バグ修正 前のトピ ... combining annotated values list querysets union difference intersection crashed mismatching columns empty choice initially selected SelectMultiple CheckboxSelectMultiple widgets クイック検索 Last update: 2026年10月09日 « previous | up | next » ... ... FileField.upload_to now supports pathlib.Path . CheckConstraint is now supported on MySQL 8.0.16+. The new allows_group_by_selected_pks_on_model() method of django.db.backends.base.BaseDatabaseFeatures allows optimization of GROUP BY clauses to require o ... nly the selected models' primary keys. By default, it's supported only for managed models on PostgreSQL. To enable the GROUP BY primary key ... n for unmanaged models, you have to subclass the PostgreSQL database engine, overriding the features class allows_group_by_selected_pks_on_model() method as you require. See Subclassing the built-in database backends for an example. Request と Response ¶ ... ... FileField.upload_to now supports pathlib.Path . CheckConstraint is now supported on MySQL 8.0.16+. The new allows_group_by_selected_pks_on_model() method of django.db.backends.base.BaseDatabaseFeatures allows optimization of GROUP BY clauses to require o ... nly the selected models' primary keys. By default, it's supported only for managed models on PostgreSQL. To enable the GROUP BY primary key ... n for unmanaged models, you have to subclass the PostgreSQL database engine, overriding the features class allows_group_by_selected_pks_on_model() method as you require. See Subclassing the built-in database backends for an example. Request と Response ¶ ... ... crashed due to mismatching columns ( #29229 ). Fixed a regression in Django 1.11 where an empty choice could be initially selected for the SelectMultiple and CheckboxSelectMultiple widgets ( #29273 ). 目次 Django 1.11.12 リリースノート バグ修正 前のトピ ... ... ce , Question # ... def vote ( request , question_id ): question = get_object_or_404 ( Question , pk = question_id ) try : selected_choice = question . choice_set . get ( pk = request . POST [ "choice" ]) except ( KeyError , Choice . DoesNotExist ): # Re ... ( request , "polls/detail.html" , { "question" : question , "error_message" : "You didn't select a choice." , }, ) else : selected_choice . votes = F ( "votes" ) + 1 selected_choice . save () # Always return an HttpResponseRedirect after successfully de ... ... ns system when the current language has no translations ( #26046 ). Fixed a regression that caused the incorrect day to be selected when opening the admin calendar widget for timezones from GMT+0100 to GMT+1200 ( #24980 ). Fixed a regression in 1.8.8 cau ... ... crashed due to mismatching columns ( #29229 ). Fixed a regression in Django 1.11 where an empty choice could be initially selected for the SelectMultiple and CheckboxSelectMultiple widgets ( #29273 ). Fixed a regression in Django 2.0 where OpenLayersWid ... ... ce , Question # ... def vote ( request , question_id ): question = get_object_or_404 ( Question , pk = question_id ) try : selected_choice = question . choice_set . get ( pk = request . POST [ "choice" ]) except ( KeyError , Choice . DoesNotExist ): # Re ... ( request , "polls/detail.html" , { "question" : question , "error_message" : "You didn't select a choice." , }, ) else : selected_choice . votes = F ( "votes" ) + 1 selected_choice . save () # Always return an HttpResponseRedirect after successfully de ... 2026年10月08日