per page, with , order by , clip by
Results of 1 - 10 of about 58 for defaults (0.004 sec.)
リレーション先オブジェクトのリファレンス 12734
リレーション先オブジェクトのリファレンス class RelatedManager "関係マネージャ(related manager)"とは、1対多または多対多の関係するコンテキストで使用されるマネージャのことです。これは2つのケースで起こります: ForeignKey リレーションの "反対側 ... この例では、以下のメソッドは topping.pizza_set と pizza.toppings の両方で利用できます。 add ( * objs , bulk = True , through_defaults = None ) aadd ( * objs , bulk = True , through_defaults = None ) 非同期バージョン : aadd() リレーション先オブジェクトのセッ ... 合、 add() は *objs 引数としてモデルインスタンスかフィールドの値(通常は主キー)を受け付けます。 必要であれば、引数 through_defaults を使用して、新しい 中間モデル インスタンスの値を指定します。呼び出し可能オブジェクトを through_defaults 辞書の値として使用 ... することができ、中間インスタンスを作成する前に一度だけ評価されます。 create ( through_defaults = None , ** kwargs ) acreate ( through_defaults = None , ** kwargs ) 非同期バージョン : acreate() 新しいオブジェクトを作成 ...
https://man.mtool.work/django/6.1/ref/models/relations.html
Tasks 11899
Tasks New in Django 6.0. The Task framework provides the contract and plumbing for background work, not the engine that runs it. The Tasks API defines how work is described, queued, and tracked, but leaves actual execution to external infra ... The @task decorator defines a Task instance. All keyword arguments are passed directly to the backend's task_class (which defaults to Task ). The following standard arguments are supported: priority : Sets the priority of the Task . Defaults to 0. queue ... _name : Sets the queue_name of the Task . Defaults to "default" . backend : Sets the backend of the Task . Defaults to "default" . takes_context : Controls whether the Task ... function accepts a TaskContext . Defaults to False . See Task context for details. Custom Task backends may define a custom task_class that accepts additional argum ...
https://man.mtool.work/django/6.1/ref/tasks.html
組み込みのビュー 11782
組み込みのビュー Django の組み込みビューのいくつかは、 ビューを記述する や他のドキュメントで説明されています。 開発中のファイルの配信 static. serve ( request , path , document_root , show_indexes = False ) プロジェクトの静的アセット以外にも ... れらを独自のカスタムビューで上書きするには、 エラービューをカスタマイズする を参照してください。 404 (page not found) ビュー defaults. page_not_found ( request , exception , template_name = '404.html' ) ビュー内で Http404 を発生させると、 Django は 404 エラ ... ーの処理に特化した特別なビューを読み込みます。デフォルトでは django.views.defaults.page_not_found() というビューで、"Not Found" メッセージを表示するか、ルートテンプレートディレクトリにテンプレート 404.html ... (設定モジュール内)、404ビューは使用されず、代わりに URLconf がデバッグ情報と共に表示されます。 500(サーバーエラー)ビュー defaults. server_error ( request , template_name = '500.html' ) 同様に、Django はビューコードで実行時エラーが発生した場合、特別なケ ...
https://man.mtool.work/django/6.1/ref/views.html
QuerySet API リファレンス 10948
QuerySet API リファレンス このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおくことをおすすめします。 このリファレン ... である必要があるためです。手動の主キーを使用している場合は、例外処理に備える必要があります。 get_or_create() get_or_create ( defaults = None , ** kwargs ) aget_or_create ( defaults = None , ** kwargs ) 非同期バージョン : aget_or_create() 与えられた kwargs ... に書き換えることができます: obj , created = Person . objects . get_or_create ( first_name = "John" , last_name = "Lennon" , defaults = { "birthday" : date ( 1940 , 10 , 9 )}, ) Any keyword arguments passed to get_or_create() — except an optional one calle ... d defaults — will be used in a get() call. If an object is found, get_or_create() returns a tuple of that object and False . 警告 この ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
Djangoの設定 10597
Djangoの設定 Djangoの設定ファイルには、インストールしたDjangoの全ての設定が含まれています。このドキュメントでは、各設定の役割と、どのような設定を利用できるか説明していきます。 基礎 設定ファイルはモジュールレベルの変数が記述された、ただのPyt ... 呼び出し時の default_settings 引数(または最初の位置引数)として渡すことができます。 この例では、デフォルトの設定は myapp_defaults から取得され、 DEBUG 設定は myapp_defaults での値に関係なく True に設定されます: from django.conf import settings from mya ... pp import myapp_defaults settings . configure ( default_settings = myapp_defaults , DEBUG = True ) 次の例では、 myapp_defaults を位置引数として使っ ... ていますが、等価です: settings . configure ( myapp_defaults , DEBUG = True ) 通常、このような方法でデフォルトを上書きする必要はありません。Django のデフォ ルトは十分に無難なので、安全 ...
https://man.mtool.work/django/6.1/topics/settings.html
Django 3.0 リリースノート 9528
Django 3.0 リリースノート 2019年12月2日 Django 3.0 へようこそ! このリリースノートでは、 バージョン 3.0 の新機能 と、Django 2.2 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... uest.headers now allows lookups using underscores (e.g. user_agent ) in place of hyphens. セキュリティ X_FRAME_OPTIONS now defaults to 'DENY' . In older versions, the X_FRAME_OPTIONS setting defaults to 'SAMEORIGIN' . If your site uses frames of itself, ... eption allows controlling whether or not exceptions raised during the request should also be raised in the test. The value defaults to True for backwards compatibility. If it is False and an exception occurs, the test client will return a 500 response wi ... hod or QuerySet.filter(pk=…).update(…) instead. For example: >>> MyModel . objects . update_or_create ( pk = existing_pk , defaults = { "name" : "new name" }) >>> MyModel . objects . filter ( pk = existing_pk ) . update ( name = "new name" ) データベース ...
https://man.mtool.work/django/6.1/releases/3.0.html
URLconf で使用するための django.urls 関数 8460
URLconf で使用するための django.urls 関数 path() path ( route , view , kwargs = None , name = None ) urlpatterns に含める要素を返します。例えば: from django.urls import include , path urlpatterns = [ path ( "index/" , views . index , name = ... ンポートパスを表す文字列です。 HTTPクライアントがリクエストを送信した場合に該当します。 デフォルトでは、これは django.views.defaults.bad_request() です。カスタムビューを実装する場合は、 request および exception 引数を受け入れ、 HttpResponseBadRequest を返 ... 限を持っていない場合に呼び出されるべきビューの完全な Python インポートパスを表す文字列。 デフォルトでは、これは django.views.defaults.permission_denied() です。カスタムビューを実装する場合には、 request と exception 引数を受け入れ、 HttpResponseForbidden を ... するものがない場合に呼び出されるべきビューへの完全な Python インポートパスを表す文字列。 デフォルトでは、これは django.views.defaults.page_not_found() です。カスタムビューを実装する場合は、 request と exception 引数を受け取り、 HttpResponseNotFound を返すよ ...
https://man.mtool.work/django/6.1/ref/urls.html
Django 0.96 リリースノート 8094
Django 0.96 リリースノート Django 0.96 へようこそ! The primary goal for 0.96 is a cleanup and stabilization of the features introduced in 0.95. There have been a few small backwards-incompatible changes since 0.95, but the upgrade process s ... callables were allowed). This allows a much more natural use of URLconfs. For example, this URLconf: from django.conf.urls.defaults import * urlpatterns = patterns ( "" , ( "^myview/$" , "mysite.myapp.views.myview" )) can now be rewritten as: from django ... .conf.urls.defaults import * from mysite.myapp.views import myview urlpatterns = patterns ( "" , ( "^myview/$" , myview )) One useful applicat ... y decorators to views in your URLconf . Thus, you can make a generic view require login very easily: from django.conf.urls.defaults import * from django.contrib.auth.decorators import login_required from django.views.generic.list_detail import object_lis ...
https://man.mtool.work/django/6.1/releases/0.96.html
Django 1.11.18 リリースノート 7977
Django 1.11.18 リリースノート January 4, 2019 Django 1.11.18 fixes a security issue in 1.11.17. CVE-2019-3498: Content spoofing possibility in the default 404 page An attacker could craft a malicious URL that could make spoofed content appe ... ar on the default page generated by the django.views.defaults.page_not_found() view. The URL path is no longer displayed in the default 404 template and the request_path context variab ...
https://man.mtool.work/django/6.1/releases/1.11.18.html
Django 5.0 リリースノート 7977
Django 5.0 リリースノート 2023年12月4日 Django 5.0 へようこそ! このリリースノートでは、 バージョン 5.0 の新機能 と、Django 4.2 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... rySet.update_or_create() と QuerySet.aupdate_or_create() メソッドに、作成操作のために異なるフィールド値を指定できる create_defaults 引数が追加されました。 BaseConstraint 、 CheckConstraint 、および UniqueConstraint に violation_error_code 属性が追加され、 ... ついて説明します。 データベースがデフォルトでデータベース関数をサポートしていない場合、 DatabaseFeatures.supports_expression_defaults を False に設定する必要があります。 データベースが INSERT クエリ内で DEFAULT キーワードをサポートしていない場合、 Database ... ートが削除されました。Django 5.0 は MySQL 8.0.11 以上をサポートします。 QuerySet.update_or_create() を使用する際に、 create_defaults__exact を必要とする場合があります。 QuerySet.update_or_create() は、パラメータ create_defaults をサポートするようになりまし ...
https://man.mtool.work/django/6.1/releases/5.0.html
PREV 1 2 3 4 5 6 NEXT