検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 44 for choices (0.009 sec.)
モデルフィールドリファレンス — Django 4.0.6 ドキュメント 14338
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... der to programmatically supply any missing values. choices ¶ Field. choices ¶ A sequence consisting itself of ... y two items (e.g. [(A, B), (A, B) ...] ) to use as choices for this field. If choices are given, they're enfo ... efault form widget will be a select box with these choices instead of the standard text field. 各タプルの最初 ... 素は人間が読むための名前です。例えば: YEAR_IN_SCHOOL_CHOICES = [ ( 'FR' , 'Freshman' ), ( 'SO' , 'Sophomore' ), ...
https://man.plustar.jp/django/ref/models/fields.html - [similar]
Form fields — Django 4.0.6 ドキュメント 13339
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... lidates that the given value exists in the list of choices. Error message keys: required , invalid_choice The ... ith the selected choice. Takes one extra argument: choices ¶ Either an iterable of 2-tuples to use as choices ... for this field, enumeration choices, or a callable that returns such an iterable. This ... argument accepts the same formats as the choices argument to a model field. See the model field ref ...
https://man.plustar.jp/django/ref/forms/fields.html - [similar]
ウィジェット — Django 4.0.6 ドキュメント 11618
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... セットされます: from django import forms BIRTH_YEAR_CHOICES = [ '1980' , '1981' , '1982' ] FAVORITE_COLORS_CHO ... et = forms . SelectDateWidget ( years = BIRTH_YEAR_CHOICES )) favorite_colors = forms . MultipleChoiceField ( ... False , widget = forms . CheckboxSelectMultiple , choices = FAVORITE_COLORS_CHOICES , ) 使用可能なウィジェッ ... れる選択肢は ChoiceField から継承され、 ChoiceField.choices を変更すると Select.choices が更新されます。たとえ ...
https://man.plustar.jp/django/ref/forms/widgets.html - [similar]
Django 3.0 リリースノート — Django 4.0.6 ドキュメント 8068
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... ainst the annotation. Enumerations for model field choices ¶ Custom enumeration types TextChoices , IntegerCh ... oices , and Choices are now available as a way to define Field.choices ... . TextChoices and IntegerChoices types are provided for text and ... integer fields. The Choices class allows defining a compatible enumeration for ...
https://man.plustar.jp/django/releases/3.0.html - [similar]
モデルからフォームを作成する — Django 4.0.6 ドキュメント 8068
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... ドの help_text がセットされます。 モデルフィールドに choices が設定されている場合、フォームフィールドの widget ... Select にセットされ、選択肢にはモデルフィールドの choices が使われます。通常、選択肢には空欄の選択肢が追加さ ... rt models from django.forms import ModelForm TITLE_CHOICES = [ ( 'MR' , 'Mr.' ), ( 'MRS' , 'Mrs.' ), ( 'MS' , ... 00 ) title = models . CharField ( max_length = 3 , choices = TITLE_CHOICES ) birth_date = models . DateField ...
https://man.plustar.jp/django/topics/forms/modelforms.html - [similar]
はじめての Django アプリ作成、その2 — Django 4.0.6 ドキュメント 7899
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... d_recently () True # Give the Question a couple of Choices. The create call constructs a new # Choice object, ... atement, adds the choice to the set # of available choices and returns the new Choice object. Django creates ... Question . objects . get ( pk = 1 ) # Display any choices from the related object set -- none so far. >>> q ... . choice_set . all () <QuerySet []> # Create three choices. >>> q . choice_set . create ( choice_text = 'Not ...
https://man.plustar.jp/django/intro/tutorial02.html - [similar]
Conditional Expressions — Django 4.0.6 ドキュメント 7822
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... GULAR = 'R' GOLD = 'G' PLATINUM = 'P' ACCOUNT_TYPE_CHOICES = [ ( REGULAR , 'Regular' ), ( GOLD , 'Gold' ), ( ... count_type = models . CharField ( max_length = 1 , choices = ACCOUNT_TYPE_CHOICES , default = REGULAR , ) Whe ...
https://man.plustar.jp/django/ref/models/conditional-expressions.html - [similar]
モデル — Django 4.0.6 ドキュメント 7822
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... の場合は、そのフィールドへの入力は必須となります。 choices このフィールドを選択肢として使用するには、2タプルの ... 択肢のリストは以下のようになります。 YEAR_IN_SCHOOL_CHOICES = [ ( 'FR' , 'Freshman' ), ( 'SO' , 'Sophomore' ), ... ( 'SR' , 'Senior' ), ( 'GR' , 'Graduate' ), ] 注釈 choices の順番を変更すると、変更のたびに新しいマイグレーシ ... る名前です。 モデルのインスタンスが与えられたとき、 choices のフィールドに対して表示される値は、 get_FOO_displ ...
https://man.plustar.jp/django/topics/db/models.html - [similar]
システムチェックフレームワーク — Django 4.0.6 ドキュメント 7745
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... that cannot be used as a field name. fields.E004 : choices must be an iterable (e.g., a list or tuple). field ... s.E005 : choices must be an iterable containing (actual value, huma ... ax_length is too small to fit the longest value in choices ( <count> characters). fields.E010 : <field> defau ... ect as using a OneToOneField . fields.W343 : limit_choices_to has no effect on ManyToManyField with a through ...
https://man.plustar.jp/django/ref/checks.html - [similar]
How to create custom template tags and filters — Django 4.0.6 ドキュメント 7653
" + tagname + " "); } }); $("div.highlight\\-html\\+django span.nf").each(function(i, elem) { va ... example. Let's write a tag that outputs a list of choices for a given Poll object, such as was created in th ... late fragment. Example: def show_results ( poll ): choices = poll . choice_set . all () return { 'choices' : ... he template is very short: < ul > {% for choice in choices %} < li > {{ choice }} </ li > {% endfor %} </ ul ...
https://man.plustar.jp/django/howto/custom-template-tags.html - [similar]
PREV 1 2 3 4 5 NEXT