per page, with , order by , clip by
Results of 1 - 10 of about 36 for status (0.005 sec.)
管理アクション 13233
管理アクション Djangoの管理者の基本的な仕事は、一言で言えば、「オブジェクトを選択し、それを変更する」ことに尽きます。これは大多数のユースケースに当てはまります。しかし、一度に多くのオブジェクトに同じ変更を適用する必要がある場合、この仕事は退 ... スはモデルの一括更新です。 Article モデルを持つニュースアプリケーションを想像してみてください: from django.db import models STATUS_CHOICES = { "d" : "Draft" , "p" : "Published" , "w" : "Withdrawn" , } class Article ( models . Model ): title = models . C ... harField ( max_length = 100 ) body = models . TextField () status = models . CharField ( max_length = 1 , choices = STATUS_CHOICES ) def __str__ ( self ): return self . title このようなモデ ... トを必要としませんが、クエリセットを使用します: def make_published ( modeladmin , request , queryset ): queryset . update ( status = "p" ) 注釈 最高のパフォーマンスを得るために、クエリセットの update メソッド を使用しています。他のタイプのアクションでは ...
https://man.mtool.work/django/6.1/ref/contrib/admin/actions.html
Django 1.1.2 リリースノート 12061
Django 1.1.2 リリースノート Django 1.1.2 へようこそ! This is the second "bugfix" release in the Django 1.1 series, improving the stability and performance of the Django 1.1 codebase. Django 1.1.2 maintains backwards compatibility with Djang ... d features in the 1.1 branch, see the Django 1.1 リリースノート . Backwards-incompatible changes in 1.1.2 Test runner exit status code The exit status code of the test runners ( tests/runtests.py and python manage.py test ) no longer represents the num ... ber of failed tests, since a failure of 256 or more tests resulted in a wrong exit status code. The exit status code for the test runner is now 0 for success (no failing tests) and 1 for any number of test failur ...
https://man.mtool.work/django/6.1/releases/1.1.2.html
Django's Tasks framework 11173
Django's Tasks framework New in Django 6.0: For older Django versions, the django-tasks backport is available. For a web application, there's often more than just turning HTTP requests into HTTP responses. For some functionality, it may be ... ok at the Queue Store for new Tasks to run. When a new Task is added, a Worker claims the Task, executes it, and saves the status and result back to the Queue Store. These workers run outside the request-response lifecycle. Configuring a Task backend T ... ImmediateBackend configured as the default backend: >>> result = double_dictionary . enqueue (( 1 , 2 , 3 )) >>> result . status FAILED >>> result . errors [ 0 ] . traceback Traceback (most recent call last): ... TypeError : unhashable type: 'list' Th ... ult() . Calling get_result() on these backends will raise NotImplementedError . Updating results A TaskResult contains the status of a Task's execution at the point it was retrieved. If the Task finishes after get_result() is called, it will not update ...
https://man.mtool.work/django/6.1/topics/tasks.html
テストツール 10872
テストツール Django は、テストを書くのに便利なツールをいくつか提供しています。 There are community-maintained solutions! Django has a vibrant ecosystem. There are testing and fixtures solutions highlighted on the Community Ecosystem page. T ... ent >>> c = Client () >>> response = c . post ( "/login/" , { "username" : "john" , "password" : "smith" }) >>> response . status_code 200 >>> response = c . get ( "/customer/details/" ) >>> response . content b'<!DOCTYPE html...' この例が示唆しているよ ... させるリクエストデータです。 wsgi_request レスポンスを生成したテストハンドラーによって生成された WSGIRequest インスタンス。 status_code レスポンスの HTTP ステータスで、数値です。 定義済みのコードの全リストは、 IANA status code registry を参照してください ... です。Django はこれらの例外を内部でキャッチし、適切な HTTP レスポンスコードに変換します。これらの場合、テストでは response.status_code をチェックできます。 Client.raise_request_exception が False の場合、テストクライアントはブラウザに返されることになる ...
https://man.mtool.work/django/6.1/topics/testing/tools.html
リクエストとレスポンスのオブジェクト 8970
リクエストとレスポンスのオブジェクト 簡単な概要 Django は、システムを通じてステータスを渡すために、リクエストとレスポンスのオブジェクトを使います。 あるページがリクエストされたとき、Django はリクエストに関するメタデータを含んだ HttpRequest ... されなかった場合、 content_type から抽出され、もしこれが失敗した場合は、 DEFAULT_CHARSET 設定が使用されます。 HttpResponse. status_code レスポンスの HTTP ステータスコード 。 reason_phrase が明示的にセットされていない限り、コンストラクタの外で status_cod ... フレーズです。これは HTTP 標準の デフォルトの reason フレーズを使用します。 reason_phrase が明示的に設定されていない場合、 status_code の値に基づいて決定されます。 HttpResponse. streaming これは常に False です。 この属性は、ミドルウェアが通常のレスポン ... sed レスポンスが閉じられた場合、 True となります。 メソッド HttpResponse. __init__ ( content = b'' , content_type = None , status = 200 , reason = None , charset = None , headers = None ) [ソース] 指定されたページ内容、コンテンツタイプ、およびヘッダーを ...
https://man.mtool.work/django/6.1/ref/request-response.html
TemplateResponse および SimpleTemplateResponse 8669
TemplateResponse および SimpleTemplateResponse 標準の HttpResponse オブジェクトは静的な構造体です。構築時にあらかじめレンダリングされたコンテンツのブロックが提供され、そのコンテンツは変更可能ですが、簡単に変更できる形ではありません。 しかし ... グされたかどうかを示す真偽値。 メソッド SimpleTemplateResponse. __init__ ( template , context = None , content_type = None , status = None , charset = None , using = None , headers = None ) [ソース] SimpleTemplateResponse オブジェクトを、与えられたテンプ ... ディングを含みます。もし content_type が指定されていれば、その値が使われます。それ以外の場合は 'text/html' が使用されます。 status レスポンスの HTTP ステータスコード charset レスポンスがエンコードされる文字コード。省略された場合は content_type から抽出さ ... t について知っています。 メソッド TemplateResponse. __init__ ( request , template , context = None , content_type = None , status = None , charset = None , using = None , headers = None ) [ソース] TemplateResponse オブジェクトを、与えられたリクエスト、 ...
https://man.mtool.work/django/6.1/ref/template-response.html
How to release Django 8526
How to release Django このドキュメントでは、Django のリリース方法について説明しています。 これらの手順を変更した場合は、最新の情報を保ってください! ここでのポイントは、規定を設けるのではなく、説明的であることです。自由に効率化したり、変更し ... RSION tuple below for details on VERSION ( example commit ). If this is a pre-release package also update the "Development Status" trove classifier in pyproject.toml to reflect this. An rc pre-release should not change the trove classifier ( example co ... mmit for alpha release , example commit for beta release ). Otherwise, make sure the classifier is set to Development Status :: 5 - Production/Stable . Building the artifacts Optionally use helper scripts You can streamline some of the steps below ... ple in django/__init__.py . This is a five-element tuple, whose elements are: Major version. Minor version. Micro version. Status -- can be one of "alpha", "beta", "rc" or "final". Series number, for alpha/beta/RC packages which run in sequence (allowi ...
https://man.mtool.work/django/6.1/internals/howto-release-django.html
モデルインスタンスリファレンス 8526
モデルインスタンスリファレンス このドキュメントでは、 Model API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおいた方がよいでしょう。 このリファレン ... y as _ class Article ( models . Model ): ... def clean ( self ): # Don't allow draft entries to have a pub_date. if self . status == "draft" and self . pub_date is not None : raise ValidationError ( _ ( "Draft entries may not have a publication date." ... )) # Set the pub_date for published items if it hasn't been set already. if self . status == "published" and self . pub_date is None : self . pub_date = datetime . date . today () Note, however, that like Model.f ... します: class Article ( models . Model ): ... def clean ( self ): # Don't allow draft entries to have a pub_date. if self . status == "draft" and self . pub_date is not None : raise ValidationError ( { "pub_date" : _ ( "Draft entries may not have a publ ...
https://man.mtool.work/django/6.1/ref/models/instances.html
Tasks 8526
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 ... . attempt [ソース] The number of the current execution attempts for this Task, starting at 1. Task results class TaskResultStatus [ソース] An Enum representing the status of a TaskResult . READY The Task has just been enqueued, or is ready to be execut ... on the backend being used. Task result ids are always strings less than 64 characters. See Task results for more details. status The status of the result. enqueued_at The time when the Task was enqueued. started_at The time when the Task began executi ...
https://man.mtool.work/django/6.1/ref/tasks.html
Django 1.2 リリースノート 8225
Django 1.2 リリースノート 2010 年 5 月 17 日 Django 1.2 へようこそ! Nearly a year in the making, Django 1.2 packs an impressive list of new features and lots of bug fixes. These release notes cover the new features, as well as important cha ... 'and', 'or' and 'not' as valid variable names. Previously, these strings could be used as variable names. Now, the keyword status is always enforced, and template code such as {% if not %} or {% if and %} will throw a TemplateSyntaxError . Also, in is ... dict__ to obtain a list of fields, you must now be prepared to handle or filter out the _state attribute. Test runner exit status code The exit status code of the test runners ( tests/runtests.py and python manage.py test ) no longer represents the num ... ber of failed tests, because a failure of 256 or more tests resulted in a wrong exit status code. The exit status code for the test runner is now 0 for success (no failing tests) and 1 for any number of test failur ...
https://man.mtool.work/django/6.1/releases/1.2.html
PREV 1 2 3 4 NEXT