per page, with , order by , clip by
Results of 1 - 10 of about 118 for subject (0.008 sec.)
フォーム API — Django 6.1 ドキュメント 13483
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム API ¶ このドキュメントについて このドキュメントでは、Django のフォーム API の詳細について説明します。このドキュメントを読む前に フォームにつ ... にデータをバインドするには、辞書型のデータを Form クラスのコンストラクタの最初のパラメータとして渡します。 >>> data = { ... "subject" : "hello" , ... "message" : "Hi there" , ... "contact_email" : "foo@example.com" , ... "urgent" : True , ... } >>> f = Co ... きは、フォームの is_bound 属性の値を確認してください。 >>> f = ContactForm () >>> f . is_bound False >>> f = ContactForm ({ "subject" : "hello" }) >>> f . is_bound True 空の辞書を渡すと、データが空の バインドされた フォームが作成されることに注意してくださ ... スでは、 is_valid() メソッドを呼び出して検証を実行し、データが有効であるかどうかを示すブール値を返します。 >>> data = { ... "subject" : "hello" , ... "message" : "Hi there" , ... "contact_email" : "foo@example.com" , ... "urgent" : True , ... } >>> f = Co ...
https://man.mtool.work/django/6.1/ref/forms/api.html
フォーム API — Django 6.1 ドキュメント 13483
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム API ¶ このドキュメントについて このドキュメントでは、Django のフォーム API の詳細について説明します。このドキュメントを読む前に フォームにつ ... にデータをバインドするには、辞書型のデータを Form クラスのコンストラクタの最初のパラメータとして渡します。 >>> data = { ... "subject" : "hello" , ... "message" : "Hi there" , ... "contact_email" : "foo@example.com" , ... "urgent" : True , ... } >>> f = Co ... きは、フォームの is_bound 属性の値を確認してください。 >>> f = ContactForm () >>> f . is_bound False >>> f = ContactForm ({ "subject" : "hello" }) >>> f . is_bound True 空の辞書を渡すと、データが空の バインドされた フォームが作成されることに注意してくださ ... スでは、 is_valid() メソッドを呼び出して検証を実行し、データが有効であるかどうかを示すブール値を返します。 >>> data = { ... "subject" : "hello" , ... "message" : "Hi there" , ... "contact_email" : "foo@example.com" , ... "urgent" : True , ... } >>> f = Co ...
https://man.mtool.work/django/6.1/ref/forms/api.html
メールを送信する — Django 6.1 ドキュメント 8269
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » メールを送信する ¶ Django provides wrappers for Python's email and smtplib modules to simplify composing and sending email. Django's email framework ... たとえば、プレーンテキストのメッセージを送信するには、次のようにします。 from django.core.mail import send_mail send_mail ( "Subject here" , "Here is the message." , "from@example.com" , [ "to@example.com" ], ) When additional email sending functionality ... mail.html" , context = { "my_variable" : 42 }, ) # Then, create a multipart email instance. msg = EmailMultiAlternatives ( subject = "Subject here" , body = text_content , from_email = "from@example.com" , to = [ "to@example.com" ], headers = { "List-Un ... 釈 django.core.mail で送信されるメールの文字セットは、 DEFAULT_CHARSET 設定の値にセットされます。 send_mail() ¶ send_mail ( subject , message , from_email , recipient_list , * , fail_silently = False , auth_user = None , auth_password = None , connection ...
https://man.mtool.work/django/6.1/topics/email.html
メールを送信する — Django 6.1 ドキュメント 8269
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » メールを送信する ¶ Django provides wrappers for Python's email and smtplib modules to simplify composing and sending email. Django's email framework ... たとえば、プレーンテキストのメッセージを送信するには、次のようにします。 from django.core.mail import send_mail send_mail ( "Subject here" , "Here is the message." , "from@example.com" , [ "to@example.com" ], ) When additional email sending functionality ... mail.html" , context = { "my_variable" : 42 }, ) # Then, create a multipart email instance. msg = EmailMultiAlternatives ( subject = "Subject here" , body = text_content , from_email = "from@example.com" , to = [ "to@example.com" ], headers = { "List-Un ... 釈 django.core.mail で送信されるメールの文字セットは、 DEFAULT_CHARSET 設定の値にセットされます。 send_mail() ¶ send_mail ( subject , message , from_email , recipient_list , * , fail_silently = False , auth_user = None , auth_password = None , connection ...
https://man.mtool.work/django/6.1/topics/email.html
Django's Tasks framework — Django 6.1 ドキュメント 7982
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django's Tasks framework ¶ New in Django 6.0: For older Django versions, the django-tasks backport is available. For a web application, there's ofte ... dule-level function: from django.core.mail import send_mail from django.tasks import task @task def email_users ( emails , subject , message ): return send_mail ( subject = subject , message = message , from_email = None , recipient_list = emails ) The ... l import send_mail from django.tasks import task @task ( priority = 2 , queue_name = "emails" ) def email_users ( emails , subject , message ): return send_mail ( subject = subject , message = message , from_email = None , recipient_list = emails ) By c ... import task logger = logging . getLogger ( __name__ ) @task ( takes_context = True ) def email_users ( context , emails , subject , message ): logger . debug ( f "Attempt { context . attempt } to send user email. Task result id: { context . task_result ...
https://man.mtool.work/django/6.1/topics/tasks.html
Django's Tasks framework — Django 6.1 ドキュメント 7982
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django's Tasks framework ¶ New in Django 6.0: For older Django versions, the django-tasks backport is available. For a web application, there's ofte ... dule-level function: from django.core.mail import send_mail from django.tasks import task @task def email_users ( emails , subject , message ): return send_mail ( subject = subject , message = message , from_email = None , recipient_list = emails ) The ... l import send_mail from django.tasks import task @task ( priority = 2 , queue_name = "emails" ) def email_users ( emails , subject , message ): return send_mail ( subject = subject , message = message , from_email = None , recipient_list = emails ) By c ... import task logger = logging . getLogger ( __name__ ) @task ( takes_context = True ) def email_users ( context , emails , subject , message ): logger . debug ( f "Attempt { context . attempt } to send user email. Task result id: { context . task_result ...
https://man.mtool.work/django/6.1/topics/tasks.html
フォームとフィールドのバリデーション — Django 6.1 ドキュメント 7808
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームとフィールドのバリデーション ¶ フォームのバリデーションは、データがクリーニング (clean) されるときに実行されます。このプロセスをカスタムした ... 関係ありません。 このフィールドの使い方を示すために、 ContactForm を作成してみましょう: class ContactForm ( forms . Form ): subject = forms . CharField ( max_length = 100 ) message = forms . CharField () contact_email = forms . EmailField () recipients = ... ールドをクリーニングして検証する ¶ Suppose we add another requirement to our contact form: if the urgent field is True , the subject must contain "help" . We are performing validation on more than one field at a time, so the form's clean() method is a goo ... Everything as before. ... def clean ( self ): cleaned_data = super () . clean () urgent = cleaned_data . get ( "urgent" ) subject = cleaned_data . get ( "subject" ) if urgent and subject : # Only do something if both fields are valid so far. if "help" ...
https://man.mtool.work/django/6.1/ref/forms/validation.html
フォームとフィールドのバリデーション — Django 6.1 ドキュメント 7808
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームとフィールドのバリデーション ¶ フォームのバリデーションは、データがクリーニング (clean) されるときに実行されます。このプロセスをカスタムした ... 関係ありません。 このフィールドの使い方を示すために、 ContactForm を作成してみましょう: class ContactForm ( forms . Form ): subject = forms . CharField ( max_length = 100 ) message = forms . CharField () contact_email = forms . EmailField () recipients = ... ールドをクリーニングして検証する ¶ Suppose we add another requirement to our contact form: if the urgent field is True , the subject must contain "help" . We are performing validation on more than one field at a time, so the form's clean() method is a goo ... Everything as before. ... def clean ( self ): cleaned_data = super () . clean () urgent = cleaned_data . get ( "urgent" ) subject = cleaned_data . get ( "subject" ) if urgent and subject : # Only do something if both fields are valid so far. if "help" ...
https://man.mtool.work/django/6.1/ref/forms/validation.html
フォームを使う — Django 6.1 ドキュメント 7745
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームを使う ¶ このドキュメントについて このドキュメントでは、Web フォームの基本と、それらを Django で扱う方法を紹介しています。より詳しく知りたい ... 人のウェブサイトで "お問い合わせ" 機能を実装します: forms.py ¶ from django import forms class ContactForm ( forms . Form ): subject = forms . CharField ( max_length = 100 ) message = forms . CharField ( widget = forms . Textarea ) contact_email = forms . ... required = False ) Our earlier form used a single field, your_name , a CharField . In this case, our form has four fields: subject , message , contact_email and urgent . CharField , EmailField and BooleanField are just three of the available field types ... 、フォームデータを処理する方法は次のとおりです。 views.py ¶ from django.core.mail import EmailMessage if form . is_valid (): subject = form . cleaned_data [ "subject" ] message = form . cleaned_data [ "message" ] contact_email = form . cleaned_data [ "con ...
https://man.mtool.work/django/6.1/topics/forms/
フォームを使う — Django 6.1 ドキュメント 7745
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームを使う ¶ このドキュメントについて このドキュメントでは、Web フォームの基本と、それらを Django で扱う方法を紹介しています。より詳しく知りたい ... 人のウェブサイトで "お問い合わせ" 機能を実装します: forms.py ¶ from django import forms class ContactForm ( forms . Form ): subject = forms . CharField ( max_length = 100 ) message = forms . CharField ( widget = forms . Textarea ) contact_email = forms . ... required = False ) Our earlier form used a single field, your_name , a CharField . In this case, our form has four fields: subject , message , contact_email and urgent . CharField , EmailField and BooleanField are just three of the available field types ... 、フォームデータを処理する方法は次のとおりです。 views.py ¶ from django.core.mail import EmailMessage if form . is_valid (): subject = form . cleaned_data [ "subject" ] message = form . cleaned_data [ "message" ] contact_email = form . cleaned_data [ "con ...
https://man.mtool.work/django/6.1/topics/forms/
PREV 1 2 3 4 5 6 7 8 9 10 NEXT