per page, with , order by , clip by
Results of 1 - 10 of about 100 for except (0.003 sec.)
Django の例外 — Django 6.1 ドキュメント 10792
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django の例外 ¶ Django は普通の Python の例外の他に、いくつか独自の例外も起こします。 Django Core 例外 ¶ Django core 例外クラスは django.core.except ... ions で定義されています。 AppRegistryNotReady ¶ exception AppRegistryNotReady [ソース] ¶ この例外は、ORM を初期化する アプリケーション読み込みプロセス が完了する前にモデルを使用 ... しようとしたときに発生します。 ObjectDoesNotExist ¶ exception ObjectDoesNotExist [ソース] ¶ Model.DoesNotExist 例外の基底クラスです。 ObjectDoesNotExist のための try/except は、すべ ... てのモデルの DoesNotExist 例外をキャッチします。 get() を参照してください。 ObjectNotUpdated ¶ New in Django 6.0. exception ObjectNotUpdated [ソース] ¶ The base class for Model.NotUpdated exceptions. A try/except for ObjectNotUpdated will catc ...
https://man.mtool.work/django/6.1/ref/exceptions.html
テンプレートのバックエンドをカスタマイズする — Django 6.1 ドキュメント 10428
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テンプレートのバックエンドをカスタマイズする ¶ カスタムのバックエンド ¶ ここでは、他のテンプレートシステムを使用するために、カスタムテンプレートバッ ... options ) def from_string ( self , template_code ): try : return Template ( self . engine . from_string ( template_code )) except foobar . TemplateCompilationFailed as exc : raise TemplateSyntaxError ( exc . args ) def get_template ( self , template_na ... me ): try : return Template ( self . engine . get_template ( template_name )) except foobar . TemplateNotFound as exc : raise TemplateDoesNotExist ( exc . args , backend = self ) except foobar . TemplateComp ...
https://man.mtool.work/django/6.1/howto/custom-template-backend.html
テンプレートのバックエンドをカスタマイズする — Django 6.1 ドキュメント 10428
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » テンプレートのバックエンドをカスタマイズする ¶ カスタムのバックエンド ¶ ここでは、他のテンプレートシステムを使用するために、カスタムテンプレートバッ ... options ) def from_string ( self , template_code ): try : return Template ( self . engine . from_string ( template_code )) except foobar . TemplateCompilationFailed as exc : raise TemplateSyntaxError ( exc . args ) def get_template ( self , template_na ... me ): try : return Template ( self . engine . get_template ( template_name )) except foobar . TemplateNotFound as exc : raise TemplateDoesNotExist ( exc . args , backend = self ) except foobar . TemplateComp ...
https://man.mtool.work/django/6.1/howto/custom-template-backend.html
Coding style — Django 6.1 ドキュメント 9713
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Coding style ¶ Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks ¶ pre-commit is a framework for man ... gross violations. Remember that PEP 8 is only a guide, so respect the style of the surrounding code as a primary goal. An exception to PEP 8 is our rules on line lengths. We allow up to 88 characters in code, as this is the line length used by black . ... tests, use assertRaisesMessage() and assertWarnsMessage() instead of assertRaises() and assertWarns() so you can check the exception or warning message. Use assertRaisesRegex() and assertWarnsRegex() only if you need regular expression matching. Use as ... rts in these groups: future, standard library, third-party libraries, other Django components, local Django component, try/excepts. Sort lines in each group alphabetically by the full module name. Place all import module statements before from module i ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
データベースのトランザクション — Django 6.1 ドキュメント 9713
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベースのトランザクション ¶ Django では、データベースのトランザクションをコントロールする方法が提供されています。 データベースのトランザクション ... ango's default). do_stuff () with transaction . atomic (): # This code executes inside a transaction. do_more_stuff () try/except ブロック内で atomic をラップすると、integrity error を自然な形で処理できます: from django.db import IntegrityError , trans ... nsaction . atomic def viewfunc ( request ): create_parent () try : with transaction . atomic (): generate_relationships () except IntegrityError : handle_exception () add_children () この例では、 generate_relationships() が整合性制約を破ってデータベース ... create_parent() での変更はそのまま同じトランザクションにバインドされます。 generate_relationships() 内での試行は、 handle_exception() が呼び出された時点ですでに安全にロールバックされていることに留意してください。したがって、必要に応じてデータベース上で ...
https://man.mtool.work/django/6.1/topics/db/transactions.html
Coding style — Django 6.1 ドキュメント 9713
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Coding style ¶ Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks ¶ pre-commit is a framework for man ... gross violations. Remember that PEP 8 is only a guide, so respect the style of the surrounding code as a primary goal. An exception to PEP 8 is our rules on line lengths. We allow up to 88 characters in code, as this is the line length used by black . ... tests, use assertRaisesMessage() and assertWarnsMessage() instead of assertRaises() and assertWarns() so you can check the exception or warning message. Use assertRaisesRegex() and assertWarnsRegex() only if you need regular expression matching. Use as ... rts in these groups: future, standard library, third-party libraries, other Django components, local Django component, try/excepts. Sort lines in each group alphabetically by the full module name. Place all import module statements before from module i ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
データベースのトランザクション — Django 6.1 ドキュメント 9713
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベースのトランザクション ¶ Django では、データベースのトランザクションをコントロールする方法が提供されています。 データベースのトランザクション ... ango's default). do_stuff () with transaction . atomic (): # This code executes inside a transaction. do_more_stuff () try/except ブロック内で atomic をラップすると、integrity error を自然な形で処理できます: from django.db import IntegrityError , trans ... nsaction . atomic def viewfunc ( request ): create_parent () try : with transaction . atomic (): generate_relationships () except IntegrityError : handle_exception () add_children () この例では、 generate_relationships() が整合性制約を破ってデータベース ... create_parent() での変更はそのまま同じトランザクションにバインドされます。 generate_relationships() 内での試行は、 handle_exception() が呼び出された時点ですでに安全にロールバックされていることに留意してください。したがって、必要に応じてデータベース上で ...
https://man.mtool.work/django/6.1/topics/db/transactions.html
Django の例外 — Django 6.1 ドキュメント 9362
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django の例外 ¶ Django は普通の Python の例外の他に、いくつか独自の例外も起こします。 Django Core 例外 ¶ Django core 例外クラスは django.core.except ... ions で定義されています。 AppRegistryNotReady ¶ exception AppRegistryNotReady [ソース] ¶ この例外は、ORM を初期化する アプリケーション読み込みプロセス が完了する前にモデルを使用 ... しようとしたときに発生します。 ObjectDoesNotExist ¶ exception ObjectDoesNotExist [ソース] ¶ Model.DoesNotExist 例外の基底クラスです。 ObjectDoesNotExist のための try/except は、すべ ... てのモデルの DoesNotExist 例外をキャッチします。 get() を参照してください。 ObjectNotUpdated ¶ New in Django 6.0. exception ObjectNotUpdated [ソース] ¶ The base class for Model.NotUpdated exceptions. A try/except for ObjectNotUpdated will catc ...
https://man.mtool.work/django/6.1/ref/exceptions.html
Migrating email to mailers — Django 6.1 ドキュメント 9011
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Migrating email to mailers ¶ Django 6.1 introduced the MAILERS setting, replacing EMAIL_BACKEND and several other EMAIL_* settings. It also introduc ... il has been configured but avoid raising an error if it hasn't (e.g., in a reusable library), wrap the send call in try: / except mail.MailerDoesNotExist: pass . To ignore all exceptions (e.g., to avoid cascading failures in an error handler that sends ... mail), wrap the send call in try: / except Exception: pass . To ignore only SMTP-related errors, wrap the send call in try / except OSError: pass . Note that this ig ... fail_silently specifically to ignore those errors, consider instead intercepting SMTPRecipientsRefused and/or SMTPResponseException s with particular smtp_code values as a more precise filter.) To create an email configuration that ignores certain bac ...
https://man.mtool.work/django/6.1/howto/mailers-migration.html
Migrating email to mailers — Django 6.1 ドキュメント 9011
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Migrating email to mailers ¶ Django 6.1 introduced the MAILERS setting, replacing EMAIL_BACKEND and several other EMAIL_* settings. It also introduc ... il has been configured but avoid raising an error if it hasn't (e.g., in a reusable library), wrap the send call in try: / except mail.MailerDoesNotExist: pass . To ignore all exceptions (e.g., to avoid cascading failures in an error handler that sends ... mail), wrap the send call in try: / except Exception: pass . To ignore only SMTP-related errors, wrap the send call in try / except OSError: pass . Note that this ig ... fail_silently specifically to ignore those errors, consider instead intercepting SMTPRecipientsRefused and/or SMTPResponseException s with particular smtp_code values as a more precise filter.) To create an email configuration that ignores certain bac ...
https://man.mtool.work/django/6.1/howto/mailers-migration.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT