per page, with , order by , clip by
Results of 1 - 10 of about 46 for func (0.004 sec.)
ビューのデコレータ — Django 6.1 ドキュメント 11930
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ビューのデコレータ ¶ Djangoでは、さまざまなHTTP機能をサポートするために、ビューに適用できるいくつかのデコレータが提供されています。 ここで紹介するデ ... django.views.decorators.http にある以下のデコレータを使って、特定のビューのキャッシュ動作を制御できます。 condition ( etag_func = None , last_modified_func = None ) [ソース] ¶ conditional_page () ¶ このデコレータを使用すると、ビューに ConditionalGetM ... iddleware と同等の条件付き GET 処理を追加できます。 etag ( etag_func ) [ソース] ¶ last_modified ( last_modified_func ) [ソース] ¶ これらのデコレータは ETag と Last-Modified ヘッダを生成するた ... go.views.decorators.vary のデコレータを使って、特定のリクエストヘッダに基づいてキャッシュを制御できます。 vary_on_cookie ( func ) ¶ vary_on_headers ( * headers ) [ソース] ¶ Vary ヘッダーはキャッシュメカニズムがキャッシュキーを構築するときにどのリクエ ...
https://man.mtool.work/django/6.1/topics/http/decorators.html
ビューのデコレータ — Django 6.1 ドキュメント 11777
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ビューのデコレータ ¶ Djangoでは、さまざまなHTTP機能をサポートするために、ビューに適用できるいくつかのデコレータが提供されています。 ここで紹介するデ ... django.views.decorators.http にある以下のデコレータを使って、特定のビューのキャッシュ動作を制御できます。 condition ( etag_func = None , last_modified_func = None ) [ソース] ¶ conditional_page () ¶ このデコレータを使用すると、ビューに ConditionalGetM ... iddleware と同等の条件付き GET 処理を追加できます。 etag ( etag_func ) [ソース] ¶ last_modified ( last_modified_func ) [ソース] ¶ これらのデコレータは ETag と Last-Modified ヘッダを生成するた ... go.views.decorators.vary のデコレータを使って、特定のリクエストヘッダに基づいてキャッシュを制御できます。 vary_on_cookie ( func ) ¶ vary_on_headers ( * headers ) [ソース] ¶ Vary ヘッダーはキャッシュメカニズムがキャッシュキーを構築するときにどのリクエ ...
https://man.mtool.work/django/6.1/topics/http/decorators.html
条件付きのビュー処理 — Django 6.1 ドキュメント 11350
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 条件付きのビュー処理 ¶ HTTP クライアントは、さまざまな HTTPヘッダーを送信することで、受信したリソースについてサーバーに伝えることができます。この方法 ... の新しいコピーを計算して通常のビューを呼び出します。 condition デコレータのシグネチャは次のようになります。 condition ( etag_func = None , last_modified_func = None ) ETag と最終更新時間を計算するための2つの関数は、受信した request オブジェクトと、それ ... らがサポートするビュー関数と同じパラメータを、同じ順序で渡されます。 last_modified_func に渡された関数は、リソースが最後に変更された時間を指定する標準の datetime 値を返すべきです。または、リソースが存在しない場 ... で変更されていないページを早期に検出できます。 from django.views.decorators.http import condition @condition ( last_modified_func = latest_entry ) def front_page ( request , blog_id ): ... デコレータの順番に注意 条件付きレスポンスが condition() によって ...
https://man.mtool.work/django/6.1/topics/conditional-view-processing.html
条件付きのビュー処理 — Django 6.1 ドキュメント 11213
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 条件付きのビュー処理 ¶ HTTP クライアントは、さまざまな HTTPヘッダーを送信することで、受信したリソースについてサーバーに伝えることができます。この方法 ... の新しいコピーを計算して通常のビューを呼び出します。 condition デコレータのシグネチャは次のようになります。 condition ( etag_func = None , last_modified_func = None ) ETag と最終更新時間を計算するための2つの関数は、受信した request オブジェクトと、それ ... らがサポートするビュー関数と同じパラメータを、同じ順序で渡されます。 last_modified_func に渡された関数は、リソースが最後に変更された時間を指定する標準の datetime 値を返すべきです。または、リソースが存在しない場 ... で変更されていないページを早期に検出できます。 from django.views.decorators.http import condition @condition ( last_modified_func = latest_entry ) def front_page ( request , blog_id ): ... デコレータの順番に注意 条件付きレスポンスが condition() によって ...
https://man.mtool.work/django/6.1/topics/conditional-view-processing.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 10496
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... フィールドを作成する を参照してください。 例 ¶ >>> from django.db.models import Count , F , Value >>> from django.db.models.functions import Length , Upper >>> from django.db.models.lookups import GreaterThan # Find companies that have more employees ... c ()) # or using the double underscore lookup syntax. >>> from django.db.models import CharField >>> from django.db.models.functions import Length >>> CharField . register_lookup ( Length ) >>> Company . objects . order_by ( "name__length" ) # Boolea ... 転する場合、以下のようにします: from django.db.models import F Company . objects . update ( is_active =~ F ( "is_active" )) Func() 式 ¶ Func() 式は COALESCE や LOWER のようなデータベース関数や、 SUM のような集計を含むすべての式の基本型です。これらは直 ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
クエリ式 (Query Expression) — Django 6.1 ドキュメント 10496
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クエリ式 (Query Expression) ¶ クエリ式 (query expression) は、update、create、filter、order by、annotation、またはaggregateの一部として使用できる値ま ... フィールドを作成する を参照してください。 例 ¶ >>> from django.db.models import Count , F , Value >>> from django.db.models.functions import Length , Upper >>> from django.db.models.lookups import GreaterThan # Find companies that have more employees ... c ()) # or using the double underscore lookup syntax. >>> from django.db.models import CharField >>> from django.db.models.functions import Length >>> CharField . register_lookup ( Length ) >>> Company . objects . order_by ( "name__length" ) # Boolea ... 転する場合、以下のようにします: from django.db.models import F Company . objects . update ( is_active =~ F ( "is_active" )) Func() 式 ¶ Func() 式は COALESCE や LOWER のようなデータベース関数や、 SUM のような集計を含むすべての式の基本型です。これらは直 ...
https://man.mtool.work/django/6.1/ref/models/expressions.html
マイグレーション・オペレーション — Django 6.1 ドキュメント 8375
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » マイグレーション・オペレーション ¶ マイグレーションファイルは一つ以上の オペレーション 、データベースに対してマイグレーションが行うべきオペレーション ... RunPython を用いて Country モデル上の初期オブジェクトを追加する例を示します: from django.db import migrations def forwards_func ( apps , schema_editor ): # We get the model from the versioned app registry; # if we directly import it, it'll be the wro ... ias ) . bulk_create ( [ Country ( name = "USA" , code = "us" ), Country ( name = "France" , code = "fr" ), ] ) def reverse_func ( apps , schema_editor ): # forwards_func() creates two Country instances, # so reverse_func() should delete them. Country ... . delete () class Migration ( migrations . Migration ): dependencies = [] operations = [ migrations . RunPython ( forwards_func , reverse_func ), ] これは データのマイグレーション の作成、独自のデータ更新と構成変更、そして ORM や Python のコードにアク ...
https://man.mtool.work/django/6.1/ref/migration-operations.html
JavaScript code — Django 6.1 ドキュメント 8375
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » JavaScript code ¶ While most of Django core is Python, the admin and gis contrib apps contain JavaScript code. Please follow these coding standards ... tructure is later changed with JavaScript. For instance, when binding a click handler, use $('body').on('click', selector, func) instead of $(selector).click(func) . This makes it easier for projects to extend Django's default behavior with JavaScrip ... 書く ¶ Django's JavaScript tests use QUnit . Here is an example test module: QUnit . module ( 'magicTricks' , { beforeEach : function () { const $ = django . jQuery ; $ ( '#qunit-fixture' ). append ( '<button class="button"></button>' ); } }); QUnit . ... test ( 'removeOnClick removes button on click' , function ( assert ) { const $ = django . jQuery ; removeOnClick ( '.button' ); assert . equal ( $ ( '.button' ). length , 1 ); ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/javascript...
マイグレーション・オペレーション — Django 6.1 ドキュメント 8375
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » マイグレーション・オペレーション ¶ マイグレーションファイルは一つ以上の オペレーション 、データベースに対してマイグレーションが行うべきオペレーション ... RunPython を用いて Country モデル上の初期オブジェクトを追加する例を示します: from django.db import migrations def forwards_func ( apps , schema_editor ): # We get the model from the versioned app registry; # if we directly import it, it'll be the wro ... ias ) . bulk_create ( [ Country ( name = "USA" , code = "us" ), Country ( name = "France" , code = "fr" ), ] ) def reverse_func ( apps , schema_editor ): # forwards_func() creates two Country instances, # so reverse_func() should delete them. Country ... . delete () class Migration ( migrations . Migration ): dependencies = [] operations = [ migrations . RunPython ( forwards_func , reverse_func ), ] これは データのマイグレーション の作成、独自のデータ更新と構成変更、そして ORM や Python のコードにアク ...
https://man.mtool.work/django/6.1/ref/migration-operations.html
JavaScript code — Django 6.1 ドキュメント 8223
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » JavaScript code ¶ While most of Django core is Python, the admin and gis contrib apps contain JavaScript code. Please follow these coding standards ... tructure is later changed with JavaScript. For instance, when binding a click handler, use $('body').on('click', selector, func) instead of $(selector).click(func) . This makes it easier for projects to extend Django's default behavior with JavaScrip ... 書く ¶ Django's JavaScript tests use QUnit . Here is an example test module: QUnit . module ( 'magicTricks' , { beforeEach : function () { const $ = django . jQuery ; $ ( '#qunit-fixture' ). append ( '<button class="button"></button>' ); } }); QUnit . ... test ( 'removeOnClick removes button on click' , function ( assert ) { const $ = django . jQuery ; removeOnClick ( '.button' ); assert . equal ( $ ( '.button' ). length , 1 ); ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/javascript...
PREV 1 2 3 4 5 NEXT