per page, with , order by , clip by
Results of 1 - 10 of about 13 for kwarg (0.003 sec.)
クラスベースのジェネリックビュー: フラットインデックス 13460
クラスベースのジェネリックビュー: フラットインデックス この索引は、クラスベースビューのリファレンス文書を、異なる観点から編成したものです。ビューごとに、クラスツリーの有効な属性とメソッドが表されます。動作を定義するクラスの観点から編集された ... ョンのアクセサ): content_type context_object_name [ get_context_object_name() ] extra_context http_method_names model pk_url_kwarg query_pk_and_slug queryset [ get_queryset() ] response_class [ render_to_response() ] slug_field [ get_slug_field() ] slug ... _url_kwarg template_engine template_name [ get_template_names() ] template_name_field template_name_suffix メソッド as_view() dispatc ... _template_names() ] メソッド as_view() dispatch() form_invalid() form_valid() get() get_context_data() get_form() get_form_kwargs() http_method_not_allowed() post() put() setup() CreateView class CreateView 属性 (とオプションのアクセサ): content_type ...
https://man.mtool.work/django/6.1/ref/class-based-views/flattened-index.html
単一オブジェクト ミックスイン (Single object mixin) 11665
単一オブジェクト ミックスイン (Single object mixin) SingleObjectMixin class django.views.generic.detail. SingleObjectMixin 現在の HTTP レスポンスに紐付いたオブジェクトをルックアップするための枠組みを提供します。 メソッドと属性 model このビュ ... してください。 slug_field スラグを含むモデル上のフィールドの名前です。デフォルトでは、 slug_field は 'slug' です。 slug_url_kwarg スラグを含む URLConf キーワード引数の名前です。デフォルトでは、 slug_url_kwarg は 'slug' です。 pk_url_kwarg プライマリキー ... を含む URLConf キーワード引数の名前です。デフォルトでは、 pk_url_kwarg は 'pk' です。 context_object_name コンテキストで使用する変数名を指定します。 query_pk_and_slug True の場合、 get_object() ... ソースとして使用されます。 それ以外の場合は、 get_queryset() が使用されます。 get_object() は、ビューへの引数の中から pk_url_kwarg 引数を探します。 この引数が見つかった場合、このメソッドはその値を使用してプライマリキーベースのルックアップを実行します。 ...
https://man.mtool.work/django/6.1/ref/class-based-views/mixins-single-object.htm...
Django 1.11.21 リリースノート 9290
Django 1.11.21 リリースノート June 3, 2019 Django 1.11.21 fixes a security issue in 1.11.20. CVE-2019-12308: AdminURLFieldWidget XSS The clickable "Current URL" link generated by AdminURLFieldWidget displayed the provided value without vali ... alue using URLValidator before displaying the clickable link. You may customize the validator by passing a validator_class kwarg to AdminURLFieldWidget.__init__() , e.g. when using formfield_overrides . ...
https://man.mtool.work/django/6.1/releases/1.11.21.html
Django 2.1.9 リリースノート 8991
Django 2.1.9 リリースノート June 3, 2019 Django 2.1.9 fixes security issues in 2.1.8. CVE-2019-12308: AdminURLFieldWidget XSS The clickable "Current URL" link generated by AdminURLFieldWidget displayed the provided value without validating ... alue using URLValidator before displaying the clickable link. You may customize the validator by passing a validator_class kwarg to AdminURLFieldWidget.__init__() , e.g. when using formfield_overrides . Patched bundled jQuery for CVE-2019-11358: Proto ...
https://man.mtool.work/django/6.1/releases/2.1.9.html
Django 2.2.2 リリースノート 8692
Django 2.2.2 リリースノート June 3, 2019 Django 2.2.2 fixes security issues and several bugs in 2.2.1. CVE-2019-12308: AdminURLFieldWidget XSS The clickable "Current URL" link generated by AdminURLFieldWidget displayed the provided value wi ... alue using URLValidator before displaying the clickable link. You may customize the validator by passing a validator_class kwarg to AdminURLFieldWidget.__init__() , e.g. when using formfield_overrides . Patched bundled jQuery for CVE-2019-11358: Proto ...
https://man.mtool.work/django/6.1/releases/2.2.2.html
ModelAdmin リストフィルタ 8533
ModelAdmin リストフィルタ ModelAdmin クラスは、以下のスクリーンショットのように、admin アプリケーションの変更一覧ページの右サイドバーに表示されるリストフィルタを定義できます: フィールドごとのフィルタリングを有効にするには、 ModelAdmin.list_ ... e to filter for any of a group of values. You need to override the expected_parameters method, and then specify the lookup_kwargs attribute with the appropriate field name. By default, multiple values in the query string will be separated with commas, ... s. list_separator = "|" def __init__ ( self , field , request , params , model , model_admin , field_path ): self . lookup_kwarg = " %s __in" % field_path super () . __init__ ( field , request , params , model , model_admin , field_path ) def expected ... _parameters ( self ): return [ self . lookup_kwarg ] 注釈 GenericForeignKey フィールドはサポートされていません。 リストフィルタは通常、フィルタに複数の選択肢がある場合にのみ ...
https://man.mtool.work/django/6.1/ref/contrib/admin/filters.html
複数オブジェクトミックスイン (Multiple object mixin) 8393
複数オブジェクトミックスイン (Multiple object mixin) MultipleObjectMixin class django.views.generic.list. MultipleObjectMixin オブジェクトのリストを表示するために使用する Mixin です。 paginate_by が指定された場合、Django は結果をページネート ... の制限を最大で paginate_orphans の値まで拡張し、最後のページでほんの少しのオブジェクトしか表示されないことを防ぎます。 page_kwarg ページのパラメータに使用する名前を指定する文字列です。ビューは ( request.GET を通じた) クエリ文字列パラメータ、もしくはURL ... conf 内で指定した kwarg が有効になっていることを必要とします。デフォルトは page です。 paginator_class ページ分割に使用する paginator クラス。デフ ... れます。たとえば、 Article モデルなら article_list という名前のコンテキストオブジェクトを保持します。 get_context_data ( ** kwargs ) オブジェクトのリストを表示するためのコンテキストデータを返します。 コンテキスト object_list : このビューが表示しているオ ...
https://man.mtool.work/django/6.1/ref/class-based-views/mixins-multiple-object.h...
テストツール 7935
テストツール Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecosystem. There are testing and fixtures solutions highlighted on the Community Ecosystem page. T ... ルスタックをカプセル化した、トレースバックオブジェクト。 例外が発生しなかった場合、 exc_info は None になります。 json ( ** kwargs ) JSON としてパースされた、レスポンスの本文です。追加のキーワード引数が json.loads() に渡されます。たとえば、次のようにな ... 存在する場合、 append と prepend は何もしません。同様に、値が存在しない場合、 remove は何もしません。 override_settings ( ** kwargs ) [ソース] In case you want to override a setting for a test method, Django provides the override_settings() decorator : ... ent . get ( "/sekrit/" ) self . assertRedirects ( response , "/other/login/?next=/sekrit/" ) modify_settings ( * args , ** kwargs ) [ソース] 同様に、Django には modify_settings() デコレータがあります: from django.test import TestCase , modify_settings ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
Django 1.4 リリースノート 7794
Django 1.4 リリースノート March 23, 2012 Django 1.4 へようこそ! These release notes cover the new features , as well as some backwards incompatible changes you'll want to be aware of when upgrading from Django 1.3 or older versions. We've a ... n extended to the trans and blocktrans template tags using the new context keyword. Customizable SingleObjectMixin URLConf kwargs Two new attributes, pk_url_kwarg and slug_url_kwarg , have been added to SingleObjectMixin to enable the customization of ... ded to template.Library to ease the creation of template tags that store data in a specified context variable. *args and **kwargs support for template tag helper functions The simple_tag , inclusion_tag and newly introduced assignment_tag template hel ... accept any number of positional or keyword arguments. For example: @register . simple_tag def my_tag ( a , b , * args , ** kwargs ): warning = kwargs [ "warning" ] profile = kwargs [ "profile" ] ... return ... Then, in the template, any number of argu ...
https://man.mtool.work/django/6.1/releases/1.4.html
組み込みのクラスベースのジェネリックビュー(汎用ビュー) 7495
組み込みのクラスベースのジェネリックビュー(汎用ビュー) ウェブアプリケーションを書くのは、特定のパターンを何度も繰り返すことになるため、単調になりがちです。Django はモデルとテンプレート層で単調さを取り除くことを試みてきましたが、ウェブ開発 ... odels import Book , Publisher class PublisherDetailView ( DetailView ): model = Publisher def get_context_data ( self , ** kwargs ): # Call the base implementation first to get a context context = super () . get_context_data ( ** kwargs ) # Add in a Q ... には様々な便利な値が格納されていることです。request ( self.request )、位置引数 ( self.args )、そして、キーワード引数 ( self.kwargs ) が、URLconf からキャプチャされてきています。 ここでは、次のように URLconf に1つのキャプチャグループがあるとしましょう。 ... books/books_by_publisher.html" def get_queryset ( self ): self . publisher = get_object_or_404 ( Publisher , name = self . kwargs [ "publisher" ]) return Book . objects . filter ( publisher = self . publisher ) queryset の選択に追加のロジックを加えるた ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-display.html
PREV 1 2 NEXT