per page, with , order by , clip by
Results of 1 - 10 of about 35 for Choice (0.003 sec.)
はじめての Django アプリ作成、その 4 13923
はじめての Django アプリ作成、その 4 このチュートリアルは チュートリアルその 3 の続きです。ここでは、引き続きWeb投票アプリケーションの開発を例にして、簡単なフォー ム処理とコードの縮小化を中心に解説します。 困ったときは: このチュートリアルの ... text }} </ h1 ></ legend > {% if error_message %} < p >< strong > {{ error_message }} </ strong ></ p > {% endif %} {% for choice in question.choice_set.all %} < input type = "radio" name = "choice" id = "choice {{ forloop .counter }} " value = " {{ ch ... oice.id }} " > < label for = "choice {{ forloop .counter }} " > {{ choice.choice_text }} </ label >< br > {% endfor %} </ fieldset > < input type = "submit" va ... の選択肢のラジオボタンを表示するものです。各ラジオボタンの value は、関連する質問の選択肢のIDです。各ラジオボタンの name は "choice" です。つまり、投票者がラジオボタンの1つを選択し、フォームを送信すると、POSTデータ choice=# (#は選んだ選択肢のID)が送信さ ...
https://man.mtool.work/django/6.1/intro/tutorial04.html
はじめての Django アプリ作成、その 2 13557
はじめての Django アプリ作成、その 2 このチュートリアルは チュートリアルその 1 の続きです。ここでは、データベースをセットアップして、最初のモデルを作成し、そして Django が自動的に生成してくれる管理サイトについて、簡単なイントロダクションをし ... o update your database schema to match your current models. これから開発する簡単な poll アプリケーションでは、 Question と Choice の2つのモデルを作成します。 Question には質問文と公開日時があります。 Choice には選択肢のテキストと vote という2つのフィー ... ルドがあります。各 Choice は1つの Question に関連づけられています。 Django では、こうした概念を簡単な Python クラスで表現できます。 polls/models.py ... el ): question_text = models . CharField ( max_length = 200 ) pub_date = models . DateTimeField ( "date published" ) class Choice ( models . Model ): question = models . ForeignKey ( Question , on_delete = models . CASCADE ) choice_text = models . Char ...
https://man.mtool.work/django/6.1/intro/tutorial02.html
はじめての Django アプリ作成、その 7 10947
はじめての Django アプリ作成、その 7 このチュートリアルは チュートリアル その6 の続きです。ここでは、引き続き Web 投票アプリケーションの開発を続け、 チュートリアル その2 で少し触れた、Django が 自動生成する管理サイトのカスタマイズに焦点を当 ... 以下のように表示されます。 リレーション先オブジェクトの追加 OK、 Question の管理ページはできました。しかし Question は複数の Choice を持つのに、管理ページには表示されていませんね。 現状はそうですが、表示はできます。 この問題を解決するには2つの方法がありま ... す。1つ目は、 Question と同じようにadminに Choice を登録する方法です: polls/admin.py from django.contrib import admin from .models import Choice , Question # ... admin . si ... te . register ( Choice ) これで、 Django の管理サイト上で「Choice」 を選べます。「Choice の追加」フォーム は以下のようになります。 このフォームで ...
https://man.mtool.work/django/6.1/intro/tutorial07.html
フォーム フィールド 8672
フォーム フィールド class Field [ソース] Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの検証ロジックがあり、他にいくつかのフックもあります。 Field. clean ( value ) [ソース] Field クラス ... ト)の場合、値から先頭と末尾の空白が削除されます。 empty_value 「空」を表すのに使用する値です。デフォルトは空の文字列です。 ChoiceField class ChoiceField ( ** kwargs ) [ソース] デフォルトのウィジェット: Select 空の値: '' (空の文字列) 正規化後の値: 文字列 ... になります。 指定された値が選択肢のリスト内に存在することを検証します。 エラーメッセージのキー: required , invalid_choice invalid_choice エラーメッセージには %(value)s が含まれていることがあり、選択された選択肢に置き換えられます。 1つの追加引数 ... を受け取ります: choices [ソース] このフィールドの選択肢として使用する2値タプルの iterable 、 列挙型 、またはそのようなイテラブルを返す呼び出し可能 ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
はじめての Django アプリ作成、その 3 8354
はじめての Django アプリ作成、その 3 このチュートリアルは チュートリアルその 2 の続きです。ここでは、引続き Web 投票アプリケーションの開発を例にして、公開用のインタフェース、ビュー(view) の作成を焦点に解説します。 困ったときは: このチュート ... ンプレートは次のようになります: polls/templates/polls/detail.html < h1 > {{ question.question_text }} </ h1 > < ul > {% for choice in question.choice_set.all %} < li > {{ choice.choice_text }} </ li > {% endfor %} </ ul > テンプレートシステムは、変数の属 ... 索に失敗すると、リストインデックスでの検索を行います。 メソッドの呼び出しは {% for %} ループの中で行われています。 question.choice_set.all は、 Python コードの question.choice_set.all() と解釈されます。その結果、 Choice オブジェクトからなるイテレーション ...
https://man.mtool.work/django/6.1/intro/tutorial03.html
Django 6.1 release notes 8290
Django 6.1 release notes August 5, 2026 Welcome to Django 6.1! 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 6.0 or earlier. We've begun the ... ng to the admin index page. The admin's FilteredSelectMultiple widget now uses <optgroup> s to preserve named groups (e.g. choices=[("Group", [("1", "Item")]), ...] ). When ModelAdmin.list_select_related is False (the default), the change list now sele ... s to stylesheet links in form media. See paths as objects for more details. The new constant django.db.models.fields.BLANK_CHOICE_LABEL defines a more accessible and translatable default label for the blank choice in forms, which is appended to most ch ... oices lists. The transitional setting USE_BLANK_CHOICE_DASH allows you to revert back to the old default label. FilePathField now provides a set_choices() method to scan the dir ...
https://man.mtool.work/django/6.1/releases/6.1.html
Django 1.11.12 リリースノート 7988
Django 1.11.12 リリースノート 2018年4月2日 Django 1.11.12 では、1.11.11 にあった2つのバグを修正しました。 バグ修正 Fixed a regression in Django 1.11.8 where combining two annotated values_list() querysets with union() , difference() , or in ... tersection() 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 ). ...
https://man.mtool.work/django/6.1/releases/1.11.12.html
Django 3.2.14 リリースノート 7988
Django 3.2.14 リリースノート 2022年7月4日 Django 3.2.14 では 3.2.13 における深刻度 "high" のセキュリティの問題を修正しました。 CVE-2022-34265: Potential SQL injection via Trunc(kind) and Extract(lookup_name) arguments Trunc() and Extract() ... L injection if untrusted data was used as a kind / lookup_name value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected. ...
https://man.mtool.work/django/6.1/releases/3.2.14.html
Django 4.0.6 リリースノート 7988
Django 4.0.6 リリースノート 2022年7月4日 Django 4.0.6 では 4.0.5 における深刻度 "high" のセキュリティの問題を修正しました。 CVE-2022-34265: Potential SQL injection via Trunc(kind) and Extract(lookup_name) arguments Trunc() and Extract() dat ... L injection if untrusted data was used as a kind / lookup_name value. Applications that constrain the lookup name and kind choice to a known safe list are unaffected. ...
https://man.mtool.work/django/6.1/releases/4.0.6.html
Django 1.5 リリースノート 7797
Django 1.5 リリースノート February 26, 2013 Django 1.5 へようこそ! 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.4 or older versions. We'v ... t were previously loaded. For example, with the tutorial's models: >>> first_poll = Poll . objects . all ()[ 0 ] >>> first_choice = first_poll . choice_set . all ()[ 0 ] >>> first_choice . poll is first_poll True In Django 1.5, the third line no longer ... triggers a new SQL query to fetch first_choice.poll ; it was set by the second line. For one-to-one relationships, both sides can be cached. For many-to-one relationship ... f 1000 forms. This limit can be raised by explicitly setting a higher value for max_num . その他 django.forms.ModelMultipleChoiceField now returns an empty QuerySet as the empty value instead of an empty list. int_to_base36() properly raises a TypeErro ...
https://man.mtool.work/django/6.1/releases/1.5.html
PREV 1 2 3 4 NEXT