per page, with , order by , clip by
Results of 1 - 10 of about 186 for required (0.010 sec.)
フォーム API — Django 6.1 ドキュメント 11633
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム API ¶ このドキュメントについて このドキュメントでは、Django のフォーム API の詳細について説明します。このドキュメントを読む前に フォームにつ ... >> f . is_valid () True Let's try with some invalid data. In this case, subject is blank (an error, because all fields are required by default) and contact_email is not a valid email address: >>> data = { ... "subject" : "" , ... "message" : "Hi there" , ... Form. errors ¶ errors 属性にアクセスして、エラーメッセージの辞書を取得します。 >>> f . errors {'subject': ['This field is required.'], 'contact_email': ['Enter a valid email address.']} この辞書では、キーはフィールド名であり、値はエラーメッセージを表す文 ... or インスタンスをマッピングする dict を返します。 >>> f . errors . as_data () {'subject': [ValidationError(['This field is required.'])], 'contact_email': [ValidationError(['Enter a valid email address.'])]} Use this method anytime you need to identify a ...
https://man.mtool.work/django/6.1/ref/forms/api.html
フォーム API — Django 6.1 ドキュメント 11633
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム API ¶ このドキュメントについて このドキュメントでは、Django のフォーム API の詳細について説明します。このドキュメントを読む前に フォームにつ ... >> f . is_valid () True Let's try with some invalid data. In this case, subject is blank (an error, because all fields are required by default) and contact_email is not a valid email address: >>> data = { ... "subject" : "" , ... "message" : "Hi there" , ... Form. errors ¶ errors 属性にアクセスして、エラーメッセージの辞書を取得します。 >>> f . errors {'subject': ['This field is required.'], 'contact_email': ['Enter a valid email address.']} この辞書では、キーはフィールド名であり、値はエラーメッセージを表す文 ... or インスタンスをマッピングする dict を返します。 >>> f . errors . as_data () {'subject': [ValidationError(['This field is required.'])], 'contact_email': [ValidationError(['Enter a valid email address.'])]} Use this method anytime you need to identify a ...
https://man.mtool.work/django/6.1/ref/forms/api.html
フォーム フィールド — Django 6.1 ドキュメント 11326
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム フィールド ¶ class Field [ソース] ¶ Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの ... 。 Field クラスによっては追加のフィールド固有の引数も取れることがありますが、以下に説明する引数は 常に 取ることができます。 required ¶ Field. required ¶ デフォルトでは、各 Field クラスは値が必須であると想定しているため、空の値 ( None もしくは空文字列 ( "" ... >> f . clean ( "foo" ) 'foo' >>> f . clean ( "" ) Traceback (most recent call last): ... ValidationError : ['This field is required.'] >>> f . clean ( None ) Traceback (most recent call last): ... ValidationError : ['This field is required.'] >>> f . cle ... clean ( True ) 'True' >>> f . clean ( False ) 'False' フィールドが必須で ない ことを指定するには、 Field コンストラクタに required=False を渡します: >>> f = forms . CharField ( required = False ) >>> f . clean ( "foo" ) 'foo' >>> f . clean ( "" ) '' >>> ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
フォーム フィールド — Django 6.1 ドキュメント 11326
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム フィールド ¶ class Field [ソース] ¶ Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの ... 。 Field クラスによっては追加のフィールド固有の引数も取れることがありますが、以下に説明する引数は 常に 取ることができます。 required ¶ Field. required ¶ デフォルトでは、各 Field クラスは値が必須であると想定しているため、空の値 ( None もしくは空文字列 ( "" ... >> f . clean ( "foo" ) 'foo' >>> f . clean ( "" ) Traceback (most recent call last): ... ValidationError : ['This field is required.'] >>> f . clean ( None ) Traceback (most recent call last): ... ValidationError : ['This field is required.'] >>> f . cle ... clean ( True ) 'True' >>> f . clean ( False ) 'False' フィールドが必須で ない ことを指定するには、 Field コンストラクタに required=False を渡します: >>> f = forms . CharField ( required = False ) >>> f . clean ( "foo" ) 'foo' >>> f . clean ( "" ) '' >>> ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
Djangoの認証システムを使用する — Django 6.1 ドキュメント 8711
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Djangoの認証システムを使用する ¶ このドキュメントでは、デフォルト設定でのDjangoの認証システムの使用方法を説明します。この設定は、タスクの適切な範囲を ... w ( request ): if not request . user . is_authenticated : return render ( request , "myapp/login_error.html" ) # ... login_required デコレータ ¶ login_required ( redirect_field_name = 'next' , login_url = None ) [ソース] ¶ ショートカットとして、便利な lo ... gin_required() デコレータを利用できます: from django.contrib.auth.decorators import login_required @login_required def my_view ( reques ... t ): ... login_required() は下記の処理を行います: もしユーザがログインしていなければ、 settings.LOGIN_URL にリダイレクトし、クエリ文字列に現在の絶 ...
https://man.mtool.work/django/6.1/topics/auth/default.html
Djangoの認証システムを使用する — Django 6.1 ドキュメント 8711
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Djangoの認証システムを使用する ¶ このドキュメントでは、デフォルト設定でのDjangoの認証システムの使用方法を説明します。この設定は、タスクの適切な範囲を ... w ( request ): if not request . user . is_authenticated : return render ( request , "myapp/login_error.html" ) # ... login_required デコレータ ¶ login_required ( redirect_field_name = 'next' , login_url = None ) [ソース] ¶ ショートカットとして、便利な lo ... gin_required() デコレータを利用できます: from django.contrib.auth.decorators import login_required @login_required def my_view ( reques ... t ): ... login_required() は下記の処理を行います: もしユーザがログインしていなければ、 settings.LOGIN_URL にリダイレクトし、クエリ文字列に現在の絶 ...
https://man.mtool.work/django/6.1/topics/auth/default.html
ウィジェット — Django 6.1 ドキュメント 7656
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ウィジェット ¶ ウィジェットは、Django が HTML の input 要素の表現方法です。ウィジェットは、HTML のレンダリングをコントロールして、ウィジェットに合致 ... Field ( widget = forms . SelectDateWidget ( years = BIRTH_YEAR_CHOICES ) ) favorite_colors = forms . MultipleChoiceField ( required = False , widget = forms . CheckboxSelectMultiple , choices = FAVORITE_COLORS_CHOICES , ) 使用可能なウィジェットとそれぞれ ... や追加の属性はありません。 >>> f = CommentForm ( auto_id = False ) >>> print ( f ) <div>Name:<input type="text" name="name" required></div> <div>Url:<input type="url" name="url" required></div> <div>Comment:<input type="text" name="comment" required></div ... になります: >>> f = CommentForm ( auto_id = False ) >>> print ( f ) <div>Name:<input type="text" name="name" class="special" required></div> <div>Url:<input type="url" name="url" required></div> <div>Comment:<input type="text" name="comment" size="40" requ ...
https://man.mtool.work/django/6.1/ref/forms/widgets.html
PostgreSQL 固有のフォームフィールドとウィジェット — Django 6.1 ドキュメント 7656
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » PostgreSQL 固有のフォームフィールドとウィジェット ¶ これらのフィールドやウィジェットはすべて django.contrib.postgres.forms モジュールから利用できます ... のそれぞれの値が保存されます。 True に設定すると、末尾の値が空白の場合、その値は結果から取り除かれます。基となるフィールドが required=True で、かつ remove_trailing_nulls が True の場合、末尾にのみ null 値が許され、その値は取り除かれます。 例: SplitArrayFie ... ld ( IntegerField ( required = True ), size = 3 , remove_trailing_nulls = False ) [ "1" , "2" , "3" ] # -> [1, 2, 3] [ "1" , "2" , "" ] # -> Validation ... Error - third entry required. [ "1" , "" , "3" ] # -> ValidationError - second entry required. [ "" , "2" , "" ] # -> ValidationError - first and third ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/forms.html
ウィジェット — Django 6.1 ドキュメント 7656
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ウィジェット ¶ ウィジェットは、Django が HTML の input 要素の表現方法です。ウィジェットは、HTML のレンダリングをコントロールして、ウィジェットに合致 ... Field ( widget = forms . SelectDateWidget ( years = BIRTH_YEAR_CHOICES ) ) favorite_colors = forms . MultipleChoiceField ( required = False , widget = forms . CheckboxSelectMultiple , choices = FAVORITE_COLORS_CHOICES , ) 使用可能なウィジェットとそれぞれ ... や追加の属性はありません。 >>> f = CommentForm ( auto_id = False ) >>> print ( f ) <div>Name:<input type="text" name="name" required></div> <div>Url:<input type="url" name="url" required></div> <div>Comment:<input type="text" name="comment" required></div ... になります: >>> f = CommentForm ( auto_id = False ) >>> print ( f ) <div>Name:<input type="text" name="name" class="special" required></div> <div>Url:<input type="url" name="url" required></div> <div>Comment:<input type="text" name="comment" size="40" requ ...
https://man.mtool.work/django/6.1/ref/forms/widgets.html
PostgreSQL 固有のフォームフィールドとウィジェット — Django 6.1 ドキュメント 7602
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » PostgreSQL 固有のフォームフィールドとウィジェット ¶ これらのフィールドやウィジェットはすべて django.contrib.postgres.forms モジュールから利用できます ... のそれぞれの値が保存されます。 True に設定すると、末尾の値が空白の場合、その値は結果から取り除かれます。基となるフィールドが required=True で、かつ remove_trailing_nulls が True の場合、末尾にのみ null 値が許され、その値は取り除かれます。 例: SplitArrayFie ... ld ( IntegerField ( required = True ), size = 3 , remove_trailing_nulls = False ) [ "1" , "2" , "3" ] # -> [1, 2, 3] [ "1" , "2" , "" ] # -> Validation ... Error - third entry required. [ "1" , "" , "3" ] # -> ValidationError - second entry required. [ "" , "2" , "" ] # -> ValidationError - first and third ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/forms.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT