per page, with , order by , clip by
Results of 1 - 10 of about 19 for TemplateResponse (0.004 sec.)
TemplateResponse および SimpleTemplateResponse 15470
TemplateResponse および SimpleTemplateResponse 標準の HttpResponse オブジェクトは静的な構造体です。構築時にあらかじめレンダリングされたコンテンツのブロックが提供され、そのコンテンツは変更可能ですが、簡単に変更できる形ではありません。 しかし ... なこともあります。たとえば、使用するテンプレートを変更したり、追加データをコンテキストに追加したりしたくなるかもしれません。 TemplateResponse はそのための方法を提供します。基本的な HttpResponse オブジェクトとは異なり、 TemplateResponse オブジェクトはレスポンスを計 ... ートとコンテキストの詳細を保持します。レスポンスの最終的な出力は、レスポンス処理の後半で必要になるまで計算されません。 SimpleTemplateResponse オブジェクト class SimpleTemplateResponse [ソース] 属性 SimpleTemplateResponse. template_name The name of the template to ... urned by get_template() ), the name of a template, or a list of template names. 例: ['foo.html', 'path/to/bar.html'] SimpleTemplateResponse. context_data テンプレートをレンダリングするときに使用するコンテキストデータ。 これは dict でなければなりません。 例: {'fo ...
https://man.mtool.work/django/6.1/ref/template-response.html
シンプルなミックスイン (mixin) 9664
シンプルなミックスイン (mixin) ContextMixin class django.views.generic.base. ContextMixin 属性 extra_context コンテキストに含める辞書。これは、 as_view() の中でコンテキストを指定する便利な方法です。使用例を次に示します。 from django.views.g ... を設定してください。より詳しい情報については、 テンプレートコンテキストのレンダリング に関するドキュメントを読んでください。 TemplateResponseMixin class django.views.generic.base. TemplateResponseMixin 適切なコンテキストを指定して TemplateResponse を構築するメカニ ... た全てのエンジンでテンプレートを検索します。 response_class render_to_response メソッドが返す response クラス。 デフォルトは TemplateResponse です。 TemplateResponse インスタンスのテンプレートとコンテキストは後で変更できます (たとえば template response ミドルウェア ... で変更できます)。 カスタムテンプレートの読み込みやカスタムコンテキストオブジェクトのインスタンス化が必要な場合は、 TemplateResponse サブクラスを作成して response_class に代入してください。 content_type レスポンスに使用するコンテンツタイプ。 content_type ...
https://man.mtool.work/django/6.1/ref/class-based-views/mixins-simple.html
クラスベースのビューでミックスイン (mixin) を使用する 8810
クラスベースのビューでミックスイン (mixin) を使用する 注意 This is an advanced topic. A working knowledge of Django's class-based views is advised before exploring these techniques. Django のビルトインのクラスベースビューではたくさんの機能が ... 況もあります; POST ではテンプレートをレンダリングするだけで、 GET のときはまったく異なる処理がしたいときなどです。この場合、 TemplateResponse を直接使えますが、コードが重複する結果となってしまいます。 この理由から、Django は個別の機能を提供する多くの mixin を用意し ... ています。たとえば、テンプレートのレンダリングは TemplateResponseMixin でカプセル化されています。Django のリファレンスドキュメントには すべてのミックスインの完全なドキュメント があります。 ... スイン (mixin) が用意されており、クラスベースビュー内のテンプレートを扱うインターフェースに一貫性を保ちやすくなっています。 TemplateResponseMixin Every built in view which returns a TemplateResponse will call the render_to_response() method that TemplateResponseM ...
https://man.mtool.work/django/6.1/topics/class-based-views/mixins.html
Django 1.8 リリースノート 8520
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... k, that means that dumpdata output will now contain the SRID value of geometry objects. Priority of context processors for TemplateResponse brought in line with render The TemplateResponse constructor is designed to be a drop-in replacement for the render() func ... tion. However, it had a slight incompatibility, in that for TemplateResponse , context data from the passed in context dictionary could be shadowed by context data returned from context processors, w ... lobally defined context processors to be overridden locally in the view. If you were relying on the fact context data in a TemplateResponse could be overridden using a context processor, you will need to change your code. Overriding setUpClass / tearDownClass in ...
https://man.mtool.work/django/6.1/releases/1.8.html
API リファレンス 8435
API リファレンス アプリケーション システムチェックフレームワーク ビルトインのクラスベースビュー API クリックジャッキング対策 contrib パッケージ コンテンツセキュリティポリシー クロスサイトリクエストフォージェリ (CSRF) 対策 データベース djang ... レーション モデル ページ分割 (Paginator) リクエストとレスポンスのオブジェクト SchemaEditor 設定 シグナル Tasks テンプレート TemplateResponse および SimpleTemplateResponse Unicode データ django.urls ユーティリティ関数 URLconf で使用するための django.urls 関数 URLc ...
https://man.mtool.work/django/6.1/ref/
Django 1.3 リリースノート 8435
Django 1.3 リリースノート March 23, 2011 Django 1.3 へようこそ! Nearly a year in the making, Django 1.3 includes quite a few new features and plenty of bug fixes and improvements to existing features. These release notes cover the new featu ... a single with block. The load tag now accepts a from argument, allowing you to load a single tag or filter from a library. TemplateResponse It can sometimes be beneficial to allow decorators or middleware to modify a response after it has been constructed by the ... dify the content of a basic HttpResponse after it has been constructed. To overcome this limitation, Django 1.3 adds a new TemplateResponse class. Unlike basic HttpResponse objects, TemplateResponse objects retain the details of the template and context that was ... response is not computed until it is needed, later in the response process. For more details, see the documentation on the TemplateResponse class. Caching changes Django 1.3 sees the introduction of several improvements to the Django's caching infrastructure. Fi ...
https://man.mtool.work/django/6.1/releases/1.3.html
ミドルウェア (Middleware) 8435
ミドルウェア (Middleware) ミドルウェアは、Django のリクエスト/レスポンス処理にフックを加えるためのフレームワークです。これは、Django の入力あるいは出力をグローバルに置き換えるための、軽量で低レベルの「プラグイン」システムです。 各ミドルウェ ... response ) request は HttpRequest クラスのオブジェクトです。 response は、Django のビューまたはミドルウェアから返される、 TemplateResponse クラスのオブジェクト (あるいはそれと同等なもの) です。 process_template_response() は、レスポンスオブジェクトが render() メ ... ソッドを持っている場合、つまり、 TemplateResponse クラスのオブジェクトあるいはそれと同等のものである場合に、ビューの実行の直後に呼ばれます。 このメソッドは、 render メソッド ... メソッド内では、与えられた response に対して response.template_name や response.context_data を修正したり、あるいは、新規に TemplateResponse クラスのオブジェクト (あるいはそれと同等なもの) を作成したりすることができます。 ただし、レスポンスを自分でレンダリング (r ...
https://man.mtool.work/django/6.1/topics/http/middleware.html
Django のショートカット関数 8213
Django のショートカット関数 django.shortcuts パッケージは、MVC の複数のレベルにまたがるヘルパー関数とクラスを集めたものです。言い換えれば、これらの関数やクラスは、便宜上、控えめな結合を取り入れます。 render() render ( request , template_nam ... ングされたテキストを持つ、 HttpResponse オブジェクトを返します。 Django does not provide a shortcut function which returns a TemplateResponse because the constructor of TemplateResponse offers the same level of convenience as render() . 必須の引数 request このレス ...
https://man.mtool.work/django/6.1/topics/http/shortcuts.html
Django ドキュメント目次 8127
Django ドキュメント目次 さぁ始めましょう Django の概要 モデルの設計 モデルのインストール 自動生成される API で楽しむ 作業場 (scaffold) ではなく完成品 (whole house) の、動的な admin インタフェース URL を設計する ビューの自作 テンプレートを設 ... テンプレート Django テンプレート言語 組み込みテンプレートタグとフィルタ Python プログラマーのための Django テンプレート言語 TemplateResponse および SimpleTemplateResponse SimpleTemplateResponse オブジェクト TemplateResponse オブジェクト レンダリングプロセス Templ ... ateResponse および SimpleTemplateResponse を使用する Unicode データ データベースの作成 一般的な文字列操作 モデル テンプレート ファイル フォームの送信 django.urls ユ ...
https://man.mtool.work/django/6.1/contents.html
クラスベースビュー入門 8059
クラスベースビュー入門 クラスベースビューはビューを実装するもう一つの手段で、関数の代わりに Python のオブジェクトとしてビューを定義します。クラスベースビューは関数ベースのビューを完全に置き換えるものではありませんが、関数ベースのビューと比較 ... 、つまり何らかの形の HttpResponse と同等のものしか返せないなら意味はありません。これが意味するのは、 http ショートカット や TemplateResponse オブジェクトはクラスベースのビューの内部でも使えるということです。 最小限のクラスベースのビューでは、ジョブを実行するのにど ... 数の親クラスのメソッドや属性を混合することができる多重継承の形式の1つです。 たとえば、ジェネリッククラスベースのビューには、 TemplateResponseMixin と呼ばれるミックスインがあり、その主な目的はメソッド render_to_response() を定義することです。 View 基底クラスの動作と ... 底クラスで定義されている動作)にリクエストをディスパッチする TemplateView メソッドクラスとなり、 template_name 属性を使用してTemplateResponseオブジェクト( TemplateResponseMixin で定義されている動作)を返す render_to_response() メソッドを持っています。 ミックスイン ...
https://man.mtool.work/django/6.1/topics/class-based-views/intro.html
PREV 1 2 NEXT