per page, with , order by , clip by
Results of 1 - 10 of about 73 for pass (0.005 sec.)
Migrating email to mailers 12115
Migrating email to mailers Django 6.1 introduced the MAILERS setting, replacing EMAIL_BACKEND and several other EMAIL_* settings. It also introduced mail.mailers for obtaining configured email backend instances, replacing mail.get_connectio ... connection() and connection arguments Replacing fail_silently Migrating custom email backends Replacing auth_user and auth_password Updating AdminEmailHandler email_backend Ignoring transient failures in error reporting バージョン 6.1 で非推奨: The f ... ollowing settings and functions will be removed in Django 2028: EMAIL_BACKEND , EMAIL_FILE_PATH , EMAIL_HOST , EMAIL_HOST_PASSWORD , EMAIL_HOST_USER , EMAIL_PORT , EMAIL_SSL_CERTFILE , EMAIL_SSL_KEYFILE , EMAIL_TIMEOUT , EMAIL_USE_SSL , EMAIL_USE_TL ... ument to send_mail() , send_mass_mail() , mail_admins() , mail_managers() , and EmailMessage.send() The auth_user and auth_password arguments to send_mail() and send_mass_mail() The email_backend argument to AdminEmailHandler Migrating settings Often ...
https://man.mtool.work/django/6.1/howto/mailers-migration.html
モデル 11318
モデル モデルは、データに関する唯一かつ決定的な情報源です。あなたが保持するデータが必要とするフィールドとその動作を定義します。一般的に、各モデルは単一のデータベースのテーブルに対応付けられます。 基本: モデルは各々 Python のクラスであり dja ... r を持たない場合、以下の定義を使用してください。 from django.db import models class Manufacturer ( models . Model ): # ... pass class Car ( models . Model ): manufacturer = models . ForeignKey ( Manufacturer , on_delete = models . CASCADE ) # ... 再帰 ... 複数の topping を持つ)場合、以下のように表現できます。 from django.db import models class Topping ( models . Model ): # ... pass class Pizza ( models . Model ): # ... toppings = models . ManyToManyField ( Topping ) ForeignKey と同様に、 再帰的なリレー ... 名はPythonの予約語にはできません。Pythonの構文エラーになるからです。たとえば次のようなものです: class Example(models.Model): pass = models.IntegerField() # 'pass' is a reserved word! フィールド名には連続したアンダースコアを2つ以上含めることはできません ...
https://man.mtool.work/django/6.1/topics/db/models.html
"sites" フレームワーク 11053
"sites" フレームワーク Django にはオプションで "sites" フレームワークが付属しています。これは、オブジェクトや機能を特定の Web サイトに関連付けるためのフックで、 Django で動くサイトのドメイン名や "冗長な" 名前を保持する場所です。 1 つの Djan ... ができます。たとえば: from django.conf import settings def my_view ( request ): if settings . SITE_ID == 3 : # Do something. pass else : # Do something else. pass It's fragile to hardcode the site IDs like that, in case they change. The cleaner way of ... ef my_view ( request ): current_site = get_current_site ( request ) if current_site . domain == "foo.com" : # Do something pass else : # Do something else. pass これには、サイトフレームワークがインストールされているかどうかを確認するという利点もありま ... _without_request (): current_site = Site . objects . get_current () if current_site . domain == "foo.com" : # Do something pass else : # Do something else. pass 表示用の現在のドメインを取得する LJWorld.com と Lawrence.com はどちらも、ニュースが発生し ...
https://man.mtool.work/django/6.1/ref/contrib/sites.html
Unit tests 10256
Unit tests Django comes with a test suite of its own, in the tests directory of the code base. It's our policy to make sure all tests pass at all times. We appreciate any and all contributions to the test suite! The Django tests all use the ... ostgres_settings ). The remainder of this documentation shows commands for running tests without tox , however, any option passed to runtests.py can also be passed to tox by prefixing the argument list with -- , as above. Tox also respects the DJANGO ... cted_failures on each backend). To run the tests with different settings, ensure that the module is on your PYTHONPATH and pass the module with --settings . The DATABASES setting in any test settings module needs to define two databases: A default da ... ount for the database. That user needs permission to execute CREATE DATABASE so that the test database can be created. The PASSWORD option needs to provide the password for the USER that has been specified. Test databases get their names by prependin ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/unit-tests...
エラーレポートの管理 9977
エラーレポートの管理 サイトを公開している場合、 DEBUG 設定は常にオフにしておかなければなりません。これにより、サーバー動作は高速になり、エラーページによって明らかになるアプリケーションの詳細が悪意あるユーザーに漏れるのを防ぎます。 しかし、 ... はメールサーバーへの接続方法をいくつか設定する必要があります。最低限 EMAIL_HOST と、おそらく EMAIL_HOST_USER と EMAIL_HOST_PASSWORD を指定する必要がありますが、メールサーバーの設定によっては他の設定も必要かもしれません。メール関連の設定の一覧は Djang ... tors.debug import sensitive_variables @sensitive_variables ( "user" , "pw" , "cc" ) def process_info ( user ): pw = user . pass_word cc = user . credit_card_number name = user . name ... 上記の例では、 user 、 pw 、 cc の値は非表示になり、エラーレポー ... st_parameters decorator: from django.views.decorators.debug import sensitive_post_parameters @sensitive_post_parameters ( "pass_word" , "credit_card_number" ) def record_user_profile ( request ): UserProfile . create ( user = request . user , passwor ...
https://man.mtool.work/django/6.1/howto/error-reporting.html
Django 1.8 リリースノート 9180
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... sult_count to control whether or not the full count of objects should be displayed on a filtered admin page. The AdminSite.password_change() method now has an extra_context parameter. You can now control who may login to the admin site by overriding ... 縮するために、認証バックエンドが has_perm() および has_module_perms() で PermissionDenied を発生させられるようになりました。 PasswordResetForm now has a method send_mail() that can be overridden to customize the mail to be sent. The max_length of Permi ... tabase migration. USERNAME_FIELD and REQUIRED_FIELDS now supports ForeignKey s. The default iteration count for the PBKDF2 password hasher has been increased by 33%. This backwards compatible change will not affect users who have subclassed django.co ...
https://man.mtool.work/django/6.1/releases/1.8.html
マイグレーション・オペレーション 8915
マイグレーション・オペレーション マイグレーションファイルは一つ以上の オペレーション 、データベースに対してマイグレーションが行うべきオペレーションを宣言的に保持するオブジェクト、から構成されます。 Django はこれらの Operation オブジェクトも ... # Operations are usually instantiated with arguments in migration # files. Store the values of them on self for later use. pass def state_forwards ( self , app_label , state ): # The Operation should take the 'state' parameter (an instance of # djang ... o.db.migrations.state.ProjectState) and mutate it to match # any schema changes that have occurred. pass def database_forwards ( self , app_label , schema_editor , from_state , to_state ): # The Operation should use schema_edit ... or to apply any changes it # wants to make to the database. pass def database_backwards ( self , app_label , schema_editor , from_state , to_state ): # If reversible is True, this is call ...
https://man.mtool.work/django/6.1/ref/migration-operations.html
Sprint quickstart guide 8649
Sprint quickstart guide This document explains how to prepare to contribute to Django. It is intended for use during sprints, or by people who are already familiar with contributing to Python open source projects. This guide assumes you're ... /  $ ./tests/runtests.py ...\> tests\runtests.py See Running the unit tests for more information. While tests will all pass in CI, they may not on every person's local environment. For example, the test suite is only guaranteed to pass on the lat ...
https://man.mtool.work/django/6.1/internals/contributing/sprint-quickstart.html
新しいコントリビューターへのアドバイス 8118
新しいコントリビューターへのアドバイス 新しいコントリビューターで、何をするべきかわかりませんか? 助けたいと思っているのにどこから手を付ければいいのかわかりませんか? このセクションはあなたのためにあります。 立ち上げる! Django へのコントリビュ ... ye out for syntax that is incompatible with older but still supported versions of Python. Run the tests and make sure they pass. Where possible and relevant, try them out on a database other than SQLite. Leave comments and feedback! Keep old patches ... be true, that means you have the extra-important job of writing the very first tests for that feature, not that you get a pass from writing tests altogether. Be patient あなたのチケットやパッチが迅速にレビューされることは、必ずしも容易ではありません ...
https://man.mtool.work/django/6.1/internals/contributing/new-contributors.html
シグナル 8118
シグナル Djangoが送信する全てのシグナルのリストです。全ての組み込みシグナルは send() メソッドを使用して送信されます。 参考 シグナルの登録方法と受信方法に関する情報については、 シグナルディスパッチャ のドキュメントを参照してください。 認証フ ... dlers as weak references by default, so if your handler is a local function, it may be garbage collected. To prevent this, pass weak=False when you call the signal's connect() . 注釈 モデルシグナルの sender モデルは、レシーバを接続する際にその完全なア ... Pizza が複数の Topping オブジェクトを持てるとしたら、次のようにモデル化されます。 class Topping ( models . Model ): # ... pass class Pizza ( models . Model ): # ... toppings = models . ManyToManyField ( Topping ) このようにハンドラーを接続した場合: ... from django.db.models.signals import m2m_changed def toppings_changed ( sender , ** kwargs ): # Do something pass m2m_changed . connect ( toppings_changed , sender = Pizza . toppings . through ) そして、次のようにした場合: >>> p = Pizza ...
https://man.mtool.work/django/6.1/ref/signals.html
PREV 1 2 3 4 5 6 7 8 NEXT