per page, with , order by , clip by
Results of 1 - 10 of about 13 for RunPython (0.006 sec.)
データベースのマイグレーションの作成方法 12844
データベースのマイグレーションの作成方法 このドキュメントでは、遭遇する可能性のあるいくつかのシナリオに対する、データベースのマイグレーションの構成方法と書き方について説明します。マイグレーションに関する入門的な資料を探しているなら、 トピッ ... する必要があるかもしれません。例えば、特定のデータベースに対してのみマイグレーションを実行したい場合です。 これを行うには、 RunPython 操作の中で、 schema_editor.connection.alias 属性を見て、データベース接続のエイリアスを確認します: from django.db import mi ... ss Migration ( migrations . Migration ): dependencies = [ # Dependencies to other migrations ] operations = [ migrations . RunPython ( forwards ), ] You can also provide hints that will be passed to the allow_migrate() method of database routers as **hint ... ss Migration ( migrations . Migration ): dependencies = [ # Dependencies to other migrations ] operations = [ migrations . RunPython ( forwards , hints = { "target_db" : "default" }), ] もし RunPython や RunSQL 操作が 1 つのモデルにしか影響しないのであれば ...
https://man.mtool.work/django/6.1/howto/writing-migrations.html
マイグレーション・オペレーション 12299
マイグレーション・オペレーション マイグレーションファイルは一つ以上の オペレーション 、データベースに対してマイグレーションが行うべきオペレーションを宣言的に保持するオブジェクト、から構成されます。 Django はこれらの Operation オブジェクトも ... erbose_name のような雑多なモデルオプション(モデルの Meta の設定)の変更を保存します。データベースには影響を与えませんが、 RunPython インスタンスが使用するためにこれらの変更を保持します。 options はオプション名と値をマッピングした辞書である必要があります。 ... ない場合、 sql もしくは reverse_sql に対して RunSQL.noop 要素を渡します。これは特に処理を逆の順序で行いたい場合に有用です。 RunPython class RunPython ( code , reverse_code = None , atomic = None , hints = None , elidable = False ) [ソース] マイグレーション ... 、先の呼び出し可能オブジェクト code で行われた処理を無効化しなければなりません。 reverse_code が None (デフォルト) の場合、 RunPython オペレーションは元に戻りません。 オプションの hints 引数はルーティングの決定を補助するためにデータベースルータの allow_mig ...
https://man.mtool.work/django/6.1/ref/migration-operations.html
マイグレーション 10047
マイグレーション マイグレーション (Migrations) は、Django でモデルに対して行った変更 (フィールドの追加やモデルの削除など) をデータベーススキーマに反映させる方法です。大抵のマイグレーションは自動で行われるものの、いつマイグレーションが作られ ... alse It's also possible to execute parts of the migration inside a transaction using atomic() or by passing atomic=True to RunPython . See 非アトミックのマイグレーション for more details. 依存関係 マイグレーションはアプリごとに作られますが、モデルが表して ... wargs のような一文を追加してください。 モデルマネージャ オプションとして、マネージャをマイグレーションにシリアライズして、 RunPython の中で使えるようにすることができます。それには次のように、マネージャクラスの中で use_in_migrations 属性を定義します。 clas ... マイグレーションを実行するとき、 Django はマイグレーションファイルに保存されたモデルの過去のバージョンから作業しています。 RunPython オペレーションを使って Python コードを書いたり、データベースルーターに allow_migrate メソッドがある場合、 直接インポートす ...
https://man.mtool.work/django/6.1/topics/migrations.html
Django 2.2.7 リリースノート 9079
Django 2.2.7 リリースノート 2019年11月4日 Django 2.2.7 fixes several bugs in 2.2.6. バグ修正 Fixed a crash when using a contains , contained_by , has_key , has_keys , or has_any_keys lookup on django.contrib.postgres.fields.JSONField , if t ... he right or left hand side of an expression is a key transform ( #30826 ). Prevented migrate --plan from showing that RunPython operations are irreversible when reverse_code callables don't have docstrings or when showing a forward migration plan ( # ...
https://man.mtool.work/django/6.1/releases/2.2.7.html
Django 1.8 リリースノート 8428
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... ze model managers as part of the model state. A generic mechanism to handle the deprecation of model fields was added. The RunPython.noop() and RunSQL.noop class method/attribute were added to ease in making RunPython and RunSQL operations reversible. The ... migration operations RunPython and RunSQL now call the allow_migrate() method of database routers. The router can use the newly introduced app_label and ... de the hints dictionary under the key 'model' . After switching to the new signature the router will also be called by the RunPython and RunSQL operations. Features removed in 1.8 These features have reached the end of their deprecation cycle and are remo ...
https://man.mtool.work/django/6.1/releases/1.8.html
Django 1.7 リリースノート 7900
Django 1.7 リリースノート September 2, 2014 Django 1.7 へようこそ! このリリースノートでは、 バージョン 1.7 の新機能 と、Django 1.6 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した ... grations; if you want to load initial data for an app, we suggest you create a migration for your application and define a RunPython or RunSQL operation in the operations section of the migration. Test rollback behavior is different for apps with migratio ... apps will not have this support. Instead, you are encouraged to load initial data in migrations if you need it (using the RunPython operation and your model classes); this has the added advantage that your initial data will not need updating every time y ...
https://man.mtool.work/django/6.1/releases/1.7.html
ロギング 7794
ロギング 参考 ロギングの設定と利用 Django のロギングの概要 Django の logging モジュールは Python の 組み込み logging モジュールを継承しています。 Logging は、一般的なDjangoの django.setup() 関数の一部として設定されているため、明示的に無効に ... .backends.schema スキーマの変更中に実行されるSQLクエリを、 マイグレーションフレームワーク によってログ記録します。ただし、 RunPython によって実行されるクエリはログされません。このロガーへのメッセージには、 params と sql が追加のコンテキストとして含まれます ...
https://man.mtool.work/django/6.1/ref/logging.html
Django 1.10 リリースノート 7689
Django 1.10 リリースノート 2016年8月1日 Django 1.10 へようこそ! このリリースノートでは、 バージョン 1.10 の新機能 と、Django 1.9 以前からアップグレードする際に注意が必要な 後方互換性が失われた変更点 について説明します。私たちは、非推奨の期間 ... ents. マイグレーション Added support for serialization of enum.Enum objects. Added the elidable argument to the RunSQL and RunPython operations to allow them to be removed when squashing migrations. Added support for non-atomic migrations by setting the a ...
https://man.mtool.work/django/6.1/releases/1.10.html
Django 1.11 リリースノート 7689
Django 1.11 リリースノート April 4, 2017 Django 1.11 へようこそ! このリリースノートでは、Django 1.10 および過去のバージョンからアップグレードする際に知っておくべきいくつかの 後方互換性のない変更 に加え、 新機能 を説明しています。 いくつかの ... マイグレーション適用のスピードを改善するため、処理が必要とするまで関連モデルのレンダリングを送らせるようになりました (例: RunPython )。 database_forwards() や database_backwards() の from_state 引数からモデルクラスやモデルインスタンスを操作するような独自 ...
https://man.mtool.work/django/6.1/releases/1.11.html
Djangoにおけるパスワード管理 7689
Djangoにおけるパスワード管理 パスワード管理は一般的に、不必要に再発明されるべきではないものです。Djangoはユーザーのパスワードを管理するための安全で柔軟なツールセットを提供するよう努めています。このドキュメントでは、Djangoがパスワードを保存す ... # replace this with the latest migration in contrib.auth ( "auth" , "####_migration_name" ), ] operations = [ migrations . RunPython ( forwards_func ), ] このマイグレーションには、ハードウェアの速度にもよりますが、数千人のユーザーで数分かかることに注意して ...
https://man.mtool.work/django/6.1/topics/auth/passwords.html
PREV 1 2 NEXT