... ルなジェネリックビュー ¶ View ¶ class View ¶ 属性 (とオプションのアクセサ): http_method_names メソッド as_view() dispatch() head() http_method_not_allowed() setup() TemplateView ¶ class TemplateView ¶ 属性 (とオプションのアクセサ): content_type extra_ ... response() ] template_engine template_name [ get_template_names() ] メソッド as_view() dispatch() get() get_context_data() head() http_method_not_allowed() render_to_response() setup() RedirectView ¶ class RedirectView ¶ 属性 (とオプションのアクセサ) ... p_method_names pattern_name permanent query_string url [ get_redirect_url() ] メソッド as_view() delete() dispatch() get() head() http_method_not_allowed() options() post() put() setup() 詳細ビュー ¶ DetailView ¶ class DetailView ¶ 属性 (とオプション ... ... ルなジェネリックビュー ¶ View ¶ class View ¶ 属性 (とオプションのアクセサ): http_method_names メソッド as_view() dispatch() head() http_method_not_allowed() setup() TemplateView ¶ class TemplateView ¶ 属性 (とオプションのアクセサ): content_type extra_ ... response() ] template_engine template_name [ get_template_names() ] メソッド as_view() dispatch() get() get_context_data() head() http_method_not_allowed() render_to_response() setup() RedirectView ¶ class RedirectView ¶ 属性 (とオプションのアクセサ) ... p_method_names pattern_name permanent query_string url [ get_redirect_url() ] メソッド as_view() delete() dispatch() get() head() http_method_not_allowed() options() post() put() setup() 詳細ビュー ¶ DetailView ¶ class DetailView ¶ 属性 (とオプション ... ... g PRNumber and TicketNumber with the actual pull request and Trac ticket numbers: / $ git fetch upstream pull/PRNumber/head:ticket_TicketNumber $ git checkout ticket_TicketNumber $ git push origin ticket_TicketNumber ...\> git fetch upstream pull ... /PRNumber/head:ticket_TicketNumber ...\> git checkout ticket_TicketNumber ...\> git push origin ticket_TicketNumber For example, to conti ... nue PR 8000 for ticket 123, run: / $ git fetch upstream pull/8000/head:ticket_123 $ git checkout ticket_123 $ git push origin ticket_123 ...\> git fetch upstream pull/8000/head:ticket_123 ...\> ... ... g PRNumber and TicketNumber with the actual pull request and Trac ticket numbers: / $ git fetch upstream pull/PRNumber/head:ticket_TicketNumber $ git checkout ticket_TicketNumber $ git push origin ticket_TicketNumber ...\> git fetch upstream pull ... /PRNumber/head:ticket_TicketNumber ...\> git checkout ticket_TicketNumber ...\> git push origin ticket_TicketNumber For example, to conti ... nue PR 8000 for ticket 123, run: / $ git fetch upstream pull/8000/head:ticket_123 $ git checkout ticket_123 $ git push origin ticket_123 ...\> git fetch upstream pull/8000/head:ticket_123 ...\> ... ... commit, use the "reword" option in interactive rebase. For example, to reword one of the last three commits: git rebase -i HEAD~3 This opens an editor listing the three commits, each prefixed with the word "pick". Change "pick" to "reword" (or "r") o ... work. To rework the history of your branch you can squash the commits into one by using interactive rebase: git rebase -i HEAD~2 The HEAD~2 above is shorthand for two latest commits. The above command will open an editor showing the two commits, pre ... "edit" option in rebase. This way you can change a single commit, for example to fix a typo in a docstring: git rebase -i HEAD~3 # Choose edit, pick, pick for the commits # Now you are able to rework the commit (use git add normally to add changes) ... ... commit, use the "reword" option in interactive rebase. For example, to reword one of the last three commits: git rebase -i HEAD~3 This opens an editor listing the three commits, each prefixed with the word "pick". Change "pick" to "reword" (or "r") o ... work. To rework the history of your branch you can squash the commits into one by using interactive rebase: git rebase -i HEAD~2 The HEAD~2 above is shorthand for two latest commits. The above command will open an editor showing the two commits, pre ... "edit" option in rebase. This way you can change a single commit, for example to fix a typo in a docstring: git rebase -i HEAD~3 # Choose edit, pick, pick for the commits # Now you are able to rework the commit (use git add normally to add changes) ... ... require_POST () ¶ ビューがPOSTメソッドのみを受け付けるようにするデコレータです。 require_safe () ¶ ビューが GET メソッドと HEAD メソッドのみを受け付けるようにするデコレータです。これらのメソッドは、要求されたリソースを取得する以外の動作をする意図を持 ... たないので、一般的に "安全である" と考えられています。 注釈 Webサーバーは、ヘッダーを変更せずに、レスポンスのコンテンツをHEADリクエストから自動的に削除するべきです。そのため、ビューではHEADリクエストをGETリクエストとまったく同じように処理できます。リ ... ンクチェッカーなどの一部のソフトウェアはHEADリクエストに依存しているため、 require_GET の代わりに require_safe を使用することをお勧めします。 条件付きのビュー処理 ¶ dja ... ... require_POST () ¶ ビューがPOSTメソッドのみを受け付けるようにするデコレータです。 require_safe () ¶ ビューが GET メソッドと HEAD メソッドのみを受け付けるようにするデコレータです。これらのメソッドは、要求されたリソースを取得する以外の動作をする意図を持 ... たないので、一般的に "安全である" と考えられています。 注釈 Webサーバーは、ヘッダーを変更せずに、レスポンスのコンテンツをHEADリクエストから自動的に削除するべきです。そのため、ビューではHEADリクエストをGETリクエストとまったく同じように処理できます。リ ... ンクチェッカーなどの一部のソフトウェアはHEADリクエストに依存しているため、 require_GET の代わりに require_safe を使用することをお勧めします。 条件付きのビュー処理 ¶ dja ... ... ¶ このビューが受け入れる HTTP メソッドの名称のリストです。 デフォルト値: [ "get" , "post" , "put" , "patch" , "delete" , "head" , "options" , "trace" ] メソッド classmethod as_view ( ** initkwargs ) ¶ リクエストを受け取ってレスポンスを返す、呼び出し ... ドと一致するメソッドに処理を委ねるよう試みます。例えば、 GET は get() に、 POST は post() に委ねられます。 デフォルトでは、 HEAD リクエストは get() に委ねられます。 HEAD リクエストを GET とは違う方法で操作する必要がある場合は、 head() メソッドをオーバ ... ドが呼び出されます。 The default implementation returns HttpResponseNotAllowed with the list of allowed methods in the Allow header, as required by RFC 7231 . The response body is empty. options ( request , * args , ** kwargs ) ¶ OPTIONS HTTP 動詞のため ... ... ¶ このビューが受け入れる HTTP メソッドの名称のリストです。 デフォルト値: [ "get" , "post" , "put" , "patch" , "delete" , "head" , "options" , "trace" ] メソッド classmethod as_view ( ** initkwargs ) ¶ リクエストを受け取ってレスポンスを返す、呼び出し ... ドと一致するメソッドに処理を委ねるよう試みます。例えば、 GET は get() に、 POST は post() に委ねられます。 デフォルトでは、 HEAD リクエストは get() に委ねられます。 HEAD リクエストを GET とは違う方法で操作する必要がある場合は、 head() メソッドをオーバ ... ドが呼び出されます。 The default implementation returns HttpResponseNotAllowed with the list of allowed methods in the Allow header, as required by RFC 7231 . The response body is empty. options ( request , * args , ** kwargs ) ¶ OPTIONS HTTP 動詞のため ... 2026年10月08日