per page, with , order by , clip by
Results of 1 - 5 of about 5 for assert (0.005 sec.)
JavaScript code 12851
JavaScript code While most of Django core is Python, the admin and gis contrib apps contain JavaScript code. Please follow these coding standards when writing JavaScript code for inclusion in Django. Code style Please conform to the indenta ... . append ( '<button class="button"></button>' ); } }); QUnit . test ( 'removeOnClick removes button on click' , function ( assert ) { const $ = django . jQuery ; removeOnClick ( '.button' ); assert . equal ( $ ( '.button' ). length , 1 ); $ ( '.button' ... ). click (); assert . equal ( $ ( '.button' ). length , 0 ); }); QUnit . test ( 'copyOnClick adds button on click' , function ( assert ) { con ... st $ = django . jQuery ; copyOnClick ( '.button' ); assert . equal ( $ ( '.button' ). length , 1 ); $ ( '.button' ). click (); assert . equal ( $ ( '.button' ). length , 2 ); }); Pl ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/javascript...
ファイルの管理 8420
ファイルの管理 この文書では、ユーザがアップロードしたようなファイルに対する Django のファイルアクセス API について説明します。下位レベルの API は十分一般的なので、他の目的にも使えます。"静的ファイル" (JS や CSS など) を扱いたい場合は、 静的 ... { "mystorage" : { "BACKEND" : "django.core.files.storage.InMemoryStorage" , } } ) def test_storage (): model = MyModel () assert isinstance ( model . upload . storage , InMemoryStorage ) ...
https://man.mtool.work/django/6.1/topics/files.html
Django 1.8 リリースノート 8236
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... ent.trace() methods were implemented, allowing you to create TRACE requests in your tests. The count argument was added to assertTemplateUsed() . This allows you to assert that a template was rendered a specific number of times. The new assertJSONNotEq ... ual() assertion allows you to test that two JSON fragments are not equal. Added options to the test command to preserve the test databa ...
https://man.mtool.work/django/6.1/releases/1.8.html
マイグレーション 8236
マイグレーション マイグレーション (Migrations) は、Django でモデルに対して行った変更 (フィールドの追加やモデルの削除など) をデータベーススキーマに反映させる方法です。大抵のマイグレーションは自動で行われるものの、いつマイグレーションが作られ ... __init__ メソッドを古い引数で呼んでしまいます。そこで、新しい引数が必要な場合は、キーワード引数を作り、コンストラクタ内に assert 'argument_name' in kwargs のような一文を追加してください。 モデルマネージャ オプションとして、マネージャをマイグレーション ...
https://man.mtool.work/django/6.1/topics/migrations.html
テストツール 8144
テストツール Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecosystem. There are testing and fixtures solutions highlighted on the Community Ecosystem page. T ... 、次のようにレスポンスを提供するビューを検証するために func 属性を使えます。 # my_view here is a function based view. self . assertEqual ( response . resolver_match . func , my_view ) # Class-based views need to compare the view_class, as the # functions ... generated by as_view() won't be equal. self . assertIs ( response . resolver_match . func . view_class , MyView ) 指定された URL が見つからない場合、この属性にアクセスすると R ... quest_exception が True である場合、例外はテストケース内で可視化されます。その後、標準の try ... except ブロックを使うか、 assertRaises() で例外をテストできます。 テストクライアントに可視化されない唯一の例外は、 Http404 、 PermissionDenied 、 SystemExi ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
PREV 1 NEXT