per page, with , order by , clip by
Results of 1 - 10 of about 52 for error message (0.006 sec.)
error (106), message (83)
フォーム API 21428
フォーム API このドキュメントについて このドキュメントでは、Django のフォーム API の詳細について説明します。このドキュメントを読む前に フォームについての概要 を読むことをおすすめします。 バインドされた (bound) フォームとバインドされていない ... 、辞書型のデータを Form クラスのコンストラクタの最初のパラメータとして渡します。 >>> data = { ... "subject" : "hello" , ... "message" : "Hi there" , ... "contact_email" : "foo@example.com" , ... "urgent" : True , ... } >>> f = ContactForm ( data ) この辞書 ... ドを呼び出して検証を実行し、データが有効であるかどうかを示すブール値を返します。 >>> data = { ... "subject" : "hello" , ... "message" : "Hi there" , ... "contact_email" : "foo@example.com" , ... "urgent" : True , ... } >>> f = ContactForm ( data ) >>> 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" : ...
https://man.mtool.work/django/6.1/ref/forms/api.html
メッセージフレームワーク 20516
メッセージフレームワーク Web アプリケーションでは非常に一般的に、フォームやその他のユーザーインプットのプロセスの後、ユーザーに向けて一過性の通知メッセージ ("フラッシュメッセージ" とも言われます) を表示する必要があります。 Django は、anonym ... クエスト) 内で表示するために、これらを検索することを可能にします。全てのメッセージは、優先順位 (たとえば info 、 warning 、 error ) を決定づける特定の level でタグづけされます。 メッセージを有効にする メッセージは、 ミドルウェア クラスと、それに対応する ... によって生成されたデフォルトの settings.py は、メッセージ機能を有効にするために必要な設定を全て含んでいます: 'django.contrib.messages' は、 INSTALLED_APPS の中にあります。 MIDDLEWARE は 'django.contrib.sessions.middleware.SessionMiddleware' と 'django.con ... trib.messages.middleware.MessageMiddleware' を含みます。 デフォルトの ストレージバックエンド は sessions に依存します。そのため Session ...
https://man.mtool.work/django/6.1/ref/contrib/messages.html
メールを送信する 19668
メールを送信する Django provides wrappers for Python's email and smtplib modules to simplify composing and sending email. Django's email framework also supports swapping in different delivery mechanisms: you can direct email to the console ... ッセージを送信するには、次のようにします。 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 is needed, use the EmailMessa ... s printed to the console as a development aid (for projects created with startproject ) or results in a MailerDoesNotExist error (when the MAILERS setting isn't defined). Use the MAILERS setting to tell Django how to send email. For example, to send t ... o substitute Django's memory email backend . This prevents test cases from sending real email and gives them access to the messages that would have been sent. 開発用にメールを設定する discusses some other approaches. Changed in Django 6.1: In earlier re ...
https://man.mtool.work/django/6.1/topics/email.html
Django 1.7 リリースノート 19485
Django 1.7 リリースノート September 2, 2014 Django 1.7 へようこそ! このリリースノートでは、 バージョン 1.7 の新機能 と、Django 1.6 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した ... ving the wrong value when it didn't match the current time zone on the server. In addition, the widgets now display a help message when the browser and server time zone are different, to clarify how the value inserted in the field will be interpreted. U ... more information about both custom lookups and transforms refer to the custom lookups documentation. Improvements to Form error handling Form.add_error() Previously there were two main patterns for handling errors in forms: Raising a ValidationError ... from within certain functions (e.g. Field.clean() , Form.clean_<fieldname>() , or Form.clean() for non-field errors.) Fiddling with Form._errors when targeting a specific field in Form.clean() or adding errors from outside of a "clean" m ...
https://man.mtool.work/django/6.1/releases/1.7.html
制約 (Constraint) リファレンス 18490
制約 (Constraint) リファレンス このモジュールで定義されたクラスはデータベース制約を作成します。これらはモデルの Meta.constraints オプションで追加されます。 組み込みの制約への参照について 制約は django.db.models.constraints で定義されています ... リデーション 制約は モデルのバリデーション の間にチェックされます。 BaseConstraint class BaseConstraint ( * name , violation_error_code = None , violation_error_message = None ) [ソース] すべての制約の基底クラスです。サブクラスは constraint_sql() , crea ... パラメータは以下の通りです: name BaseConstraint. name 制約の名前。制約には常に一意な名前を指定する必要があります。 violation_error_code BaseConstraint. violation_error_code モデルのバリデーション 中に ValidationError が発生した場合に使用されるエラーコー ... ドです。デフォルトは None です。 violation_error_message BaseConstraint. violation_error_message モデルのバリデーション の実行中に ValidationError が発生した場合に表示されるエラー ...
https://man.mtool.work/django/6.1/ref/models/constraints.html
ロギング 17319
ロギング 参考 ロギングの設定と利用 Django のロギングの概要 Django の logging モジュールは Python の 組み込み logging モジュールを継承しています。 Logging は、一般的なDjangoの django.setup() 関数の一部として設定されているため、明示的に無効に ... ジをコンソールに送信します。 DEBUG が False のとき: django ロガーは、 django ヒエラルキー ( django.server を除く) において、 ERROR ないし CRITICAL レベルを AdminEmailHandler に送信します。 DEBUG の値にかかわらず: django.server ロガーは INFO レベル以上の ... e" , }, }, "formatters" : { "django.server" : { "()" : "django.utils.log.ServerFormatter" , "format" : "[ {server_time} ] {message} " , "style" : "{" , } }, "handlers" : { "console" : { "level" : "INFO" , "filters" : [ "require_debug_true" ], "class" : ... : { "level" : "INFO" , "class" : "logging.StreamHandler" , "formatter" : "django.server" , }, "mail_admins" : { "level" : "ERROR" , "filters" : [ "require_debug_false" ], "class" : "django.utils.log.AdminEmailHandler" , }, }, "loggers" : { "django" : ...
https://man.mtool.work/django/6.1/ref/logging.html
Django 1.8 リリースノート 15453
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... SL_KEYFILE settings. The SMTP EmailBackend now supports setting the timeout parameter with the EMAIL_TIMEOUT setting. EmailMessage and EmailMultiAlternatives now support the reply_to parameter. ファイルストレージ Storage.get_available_name() and Storage ... -level maximum filename length constraints. Filenames exceeding this argument will get truncated. This prevents a database error when appending a unique suffix to a long filename that already exists on the storage. See the deprecation note about addin ... lasses. フォーム Form widgets now render attributes with a value of True or False as HTML5 boolean attributes. The new has_error() method allows checking if a specific error has happened. If required_css_class is defined on a form, then the <label> ta ...
https://man.mtool.work/django/6.1/releases/1.8.html
システムチェックフレームワーク 15147
システムチェックフレームワーク システムチェックフレームワークは、Django プロジェクトを検証するための静的チェックのセットです。一般的な問題を検出し、それらを修正するヒントを提供します。このフレームワークは拡張性があり、独自のチェックを簡単に ... 種類のチェックを実行する関数を書くことができます。以下は、例としてのスタブチェック関数です。 from django.core.checks import Error , register @register () def example_check ( app_configs , ** kwargs ): errors = [] # ... your check logic here if check_fa ... iled : errors . append ( Error ( "an error" , hint = "A hint." , obj = checked_object , id = "myapp.E001" , ) ) return errors チェック関 ... が見つからない場合、チェック関数は空のリストを返さなければなりません。 チェックメソッドで発生させる警告やエラーは、必ず CheckMessage のインスタンスでなければなりません。 CheckMessage のインスタンスは、1つの報告可能なエラーや警告をカプセル化します。また、メ ...
https://man.mtool.work/django/6.1/topics/checks.html
フォームとフィールドのバリデーション 14739
フォームとフィールドのバリデーション フォームのバリデーションは、データがクリーニング (clean) されるときに実行されます。このプロセスをカスタムしたい場合は、様々な箇所に変更を加えることができ、それぞれが違う目的を持っています。クリーニング方 ... 上の is_valid() メソッドを呼び出したときに実行されます。このほかにも、クリーニングとバリデーションのトリガーとなる処理 (直接 errors 属性にアクセスしたり、 full_clean() を直接呼び出す) がありますが、通常必要とはなりません。 一般的に、あらゆるクリーニング ... 方法は ValidationError を投げる可能性があります。処理されるデータに問題がある場合、関連情報を ValidationError コンストラクタに渡します。 下記項目 ... に、 ContactForm を作成してみましょう: class ContactForm ( forms . Form ): subject = forms . CharField ( max_length = 100 ) message = forms . CharField () contact_email = forms . EmailField () recipients = MultiEmailField () urgent = forms . BooleanField ...
https://man.mtool.work/django/6.1/ref/forms/validation.html
PostgreSQL 固有のデータベース制約 14696
PostgreSQL 固有のデータベース制約 PostgreSQL は django.contrib.postgres.constraints モジュールから利用できる追加のデータ整合性制約をサポートしています。これらはモデル Meta.constraints オプションで追加されます。 ExclusionConstraint class Exc ... onstraint ( * , name , expressions , index_type = None , condition = None , deferrable = None , include = None , violation_error_code = None , violation_error_message = None ) [ソース] データベースに排他制約を作成します。内部的には、PostgreSQLはインデ ... ion マイグレーションオペレーションを使ってインストールできます。 既存の行と競合する新しい行を挿入しようとすると、 IntegrityError が発生します。更新が既存の行と競合する場合も同様です。 排他制約は モデル バリデーション の間にチェックされます。 name Excl ... ルのバリデーション 中に ValidationError が発生した場合に使用されるエラーコードです。デフォルトは None です。 violation_error_message モデルのバリデーション 中に ValidationError が発生した場合に使用されるエラーメッセージです。デフォルトは BaseConstraint.vi ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/constraints.html
PREV 1 2 3 4 5 6 NEXT