... ースのジェネリックビューのテンプレートコンテキストには、 View インスタンスを指す view 変数が含まれています。 適切な場合には alters_data を使用する ビュー インスタンスをテンプレートコンテキスト内に持つことは、潜在的に危険なメソッドを、テンプレートの作者に ... 公開してしまう可能性があることに注意してください。このようなメソッドがテンプレート内で呼ばれるのを防ぐには、そのメソッドに alters_data=True を設定してください。より詳しい情報については、 テンプレートコンテキストのレンダリング に関するドキュメントを読ん ... ate インスタンス kwargs キーワード TemplateResponse views generic view ContextMixin base 属性 extra 辞書 TemplateView self alters レンダリング TemplateResponseMixin サブクラス engine エンジン クイック検索 Last update: 2026年10月09日 « previous | up | n ... ... ースのジェネリックビューのテンプレートコンテキストには、 View インスタンスを指す view 変数が含まれています。 適切な場合には alters_data を使用する ビュー インスタンスをテンプレートコンテキスト内に持つことは、潜在的に危険なメソッドを、テンプレートの作者に ... 公開してしまう可能性があることに注意してください。このようなメソッドがテンプレート内で呼ばれるのを防ぐには、そのメソッドに alters_data=True を設定してください。より詳しい情報については、 テンプレートコンテキストのレンダリング に関するドキュメントを読ん ... ... システムはこのようなことをしてはいけません: I will now delete this valuable data. {{ data.delete }} To prevent this, set an alters_data attribute on the callable variable. The template system won't call a variable if it has alters_data=True set, and wil ... ith string_if_invalid , unconditionally. The dynamically-generated delete() and save() methods on Django model objects get alters_data=True automatically. Example: def sensitive_function ( self ): self . database_record . delete () sensitive_function . ... alters_data = True Occasionally you may want to turn off this feature for other reasons, and tell the template system to leave a ... ... システムはこのようなことをしてはいけません: I will now delete this valuable data. {{ data.delete }} To prevent this, set an alters_data attribute on the callable variable. The template system won't call a variable if it has alters_data=True set, and wil ... ith string_if_invalid , unconditionally. The dynamically-generated delete() and save() methods on Django model objects get alters_data=True automatically. Example: def sensitive_function ( self ): self . database_record . delete () sensitive_function . ... alters_data = True Occasionally you may want to turn off this feature for other reasons, and tell the template system to leave a ... ... 、実行を拒否します。代わりに、 remove_field() と add_field() は別々に呼び出されるべきです。 データベースが supports_combined_alters を持っている場合、Django はこれらの操作をできるだけ一つのデータベースコールで実行しようとします。そうでなければ、変更が必要 ... ... 、実行を拒否します。代わりに、 remove_field() と add_field() は別々に呼び出されるべきです。 データベースが supports_combined_alters を持っている場合、Django はこれらの操作をできるだけ一つのデータベースコールで実行しようとします。そうでなければ、変更が必要 ... ... テンプレートには含まれなくなりました。 下記のメソッドは テンプレートコンテキストをレンダリングする 際の副作用を防ぐために、 alters_data=True が設定されるようになりました。 UserManager.create_user() UserManager.acreate_user() UserManager.create_superuser ... ... テンプレートには含まれなくなりました。 下記のメソッドは テンプレートコンテキストをレンダリングする 際の副作用を防ぐために、 alters_data=True が設定されるようになりました。 UserManager.create_user() UserManager.acreate_user() UserManager.create_superuser ... ... session [ "foo" ] # Session is modified. request . session [ "foo" ] = {} # Gotcha: Session is NOT modified, because this alters # request.session['foo'] instead of request.session. request . session [ "foo" ][ "bar" ] = "baz" 上の例の場合、セッション ... ... session [ "foo" ] # Session is modified. request . session [ "foo" ] = {} # Gotcha: Session is NOT modified, because this alters # request.session['foo'] instead of request.session. request . session [ "foo" ][ "bar" ] = "baz" 上の例の場合、セッション ... 2026年10月08日