per page, with , order by , clip by
Results of 1 - 10 of about 92 for call (0.007 sec.)
Django's Tasks framework 10639
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 ... users . using ( priority = 10 ) . priority 10 Enqueueing Tasks To add the Task to the queue store, so it will be executed, call the enqueue() method on it. If the Task takes arguments, these can be passed as-is. For example: result = email_users . en ... serialized to JSON, they must be JSON-serializable: >>> process_data . enqueue ( datetime . now ()) Traceback (most recent call last): ... TypeError : Object of type datetime is not JSON serializable Arguments must also be able to round-trip through ... ctionary . enqueue (( 1 , 2 , 3 )) >>> result . status FAILED >>> result . errors [ 0 ] . traceback Traceback (most recent call last): ... TypeError : unhashable type: 'list' The double_dictionary Task fails because after the JSON round-trip the tupl ...
https://man.mtool.work/django/6.1/topics/tasks.html
システムチェックフレームワーク 10228
システムチェックフレームワーク システムチェックフレームワークは、Django プロジェクトを検証するための静的チェックのセットです。一般的な問題を検出し、それらを修正するヒントを提供します。このフレームワークは拡張性があり、独自のチェックを簡単に ... None , ** kwargs ): super () . __init__ ( ** kwargs ) self . min = min self . max = max def check ( self , ** kwargs ): # Call the superclass errors = super () . check ( ** kwargs ) # Do some custom checks and add messages to `errors`: errors . exte ... み込み時には特定のチェックを登録する必要があるため、システムチェックフレームワーク内での統合をテストするのが便利です。これは call_command() 関数を使うことで実現できます。 例えば、このテストは SITE_ID の設定が整数でなければならないことを示しています。こ ... れは組み込みの サイト フレームワークからのチェック のものです: from django.core.management import call_command from django.core.management.base import SystemCheckError from django.test import SimpleTestCase , modify_settings ...
https://man.mtool.work/django/6.1/topics/checks.html
django-admin と manage.py 9830
django-admin と manage.py django-admin は Django の管理タスクのためのコマンドラインユーティリティです。このドキュメントでは、その機能の全体を一通り説明します。 さらに、 manage.py は各 Django プロジェクト内に自動的に作成されます。 jango-admi ... hell django-admin shell Python のインタラクティブ・インタープリタを開始します。 All models from installed apps are automatically imported into the shell environment. Models from apps listed earlier in INSTALLED_APPS take precedence. The following com ... , models from django.conf import settings from django.utils import timezone For a --verbosity of 2 or higher, the automatically imported objects will be listed. To disable automatic importing entirely, use the --no-imports flag. See the guide on cus ... -buffer オプション と同じように、テストに合格した出力 ( stdout と stderr ) を破棄します。 --no-faulthandler Django automatically calls faulthandler.enable() when starting the tests, which allows it to print a traceback if the interpreter crashes. Pas ...
https://man.mtool.work/django/6.1/ref/django-admin.html
Django 1.8 リリースノート 9830
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... e PostGIS 2 CREATE EXTENSION postgis and the SpatiaLite SELECT InitSpatialMetaData initialization commands are now automatically run by migrate . The GDAL interface now supports retrieving properties of raster (image) data file . Compatibility shims ... ds compatibility but should not be used any longer. django.contrib.sessions Session cookie is now deleted after flush() is called. django.contrib.sitemaps The new Sitemap.i18n attribute allows you to generate a sitemap based on the LANGUAGES setting. ... nger creates explicit indexes for foreign keys when using the InnoDB storage engine, as MySQL already creates them automatically. The Oracle backend no longer defines the connection_persists_old_columns feature as True . Instead, Oracle will now incl ...
https://man.mtool.work/django/6.1/releases/1.8.html
Django 1.5 リリースノート 9432
Django 1.5 リリースノート February 26, 2013 Django 1.5 へようこそ! These release notes cover the new features , as well as some backwards incompatible changes you'll want to be aware of when upgrading from Django 1.4 or older versions. We'v ... l.save() now accepts an update_fields argument, letting you specify which fields are written back to the database when you call save() . This can help in high-concurrency operations, and can improve performance. Better support for streaming responses ... support, and Django 1.5 supports that alpha release. Python 3 support Django 1.5 introduces support for Python 3 - specifically, Python 3.2 and above. This comes in the form of a single codebase; you don't need to install a different version of Djan ... hen trying to avoid overwriting concurrent changes. Deferred instances (those loaded by .only() or .defer() ) will automatically save just the loaded fields. If any field is set manually after load, that field will also get updated on save. See the M ...
https://man.mtool.work/django/6.1/releases/1.5.html
メールを送信する 9021
メールを送信する Django provides wrappers for Python's email and smtplib modules to simplify composing and sending email. Django's email framework also supports swapping in different delivery mechanisms: you can direct email to the console ... er sending features. During development or testing you often don't want to send email at all. Django's test runner automatically overrides the MAILERS configuration to substitute Django's memory email backend . This prevents test cases from sending r ... ow raises a TypeError . send_mass_mail() と send_mail() の比較 The main difference between send_mass_mail() and repeatedly calling send_mail() is that send_mail() opens a connection to the mail server each time it's executed, while send_mass_mail() u ... essage class is initialized with the following parameters. All parameters are optional and can be set at any time prior to calling the send() method. The first four parameters can be passed as positional or keyword arguments, but must be in the given ...
https://man.mtool.work/django/6.1/topics/email.html
QuerySet API リファレンス 8822
QuerySet API リファレンス このドキュメントでは、 QuerySet API の詳細を説明しています。 モデル と データベースクエリ ガイドにある説明を前提としていますので、このドキュメントを読む前にこの 2 つを読んでおくことをおすすめします。 このリファレン ... ( Lower ( "headline" ) . desc ()) If you don't want any ordering to be applied to a query, not even the default ordering, call order_by() with no parameters. クエリに並び替えが適用されたかどうかは、 QuerySet.ordered 属性を確認することで知ることができ ... L で効率的に行うことができないため、Django ではサポートされていません。 Also, note that reverse() should generally only be called on a QuerySet which has a defined ordering (e.g., when querying against a model which defines a default ordering, or whe ... n using order_by() ). If no such ordering is defined for a given QuerySet , calling reverse() on it has no real effect (the ordering was undefined prior to calling reverse() , and will remain undefined a ...
https://man.mtool.work/django/6.1/ref/models/querysets.html
ページ分割 (Pagination) 8822
ページ分割 (Pagination) Django は、ページ分割 (ページネーション) されたデータを管理するための高レベルと低レベルの方法を提供しています。つまり、"前へ/次へ" リンクを持つ、複数のページに分割されたデータです。 Paginator クラス 内部では、ページ分 ... >> page2 . has_previous () True >>> page2 . has_other_pages () True >>> page2 . next_page_number () Traceback (most recent call last): ... EmptyPage : That page contains no results >>> page2 . previous_page_number () 1 >>> page2 . start_index () # Th ... e 3 >>> page2 . end_index () # The 1-based index of the last item on this page 4 >>> p . page ( 0 ) Traceback (most recent call last): ... EmptyPage : That page number is less than 1 >>> p . page ( 3 ) Traceback (most recent call last): ... EmptyPage ...
https://man.mtool.work/django/6.1/topics/pagination.html
Django 1.10 リリースノート 8623
Django 1.10 リリースノート 2016年8月1日 Django 1.10 へようこそ! このリリースノートでは、 バージョン 1.10 の新機能 と、Django 1.9 以前からアップグレードする際に注意が必要な 後方互換性が失われた変更点 について説明します。私たちは、非推奨の期間 ... tom tools in this case. The LogEntry model now stores change messages in a JSON structure so that the message can be dynamically translated using the current active language. A new LogEntry.get_change_message() method is now the preferred way of retr ... erwise. The new Storage.generate_filename() method makes it easier to implement custom storages that don't use the os.path calls previously in FileField . フォーム Form and widget Media is now served using django.contrib.staticfiles if installed. The ... angojs translation domain from all installed apps rather than only the JavaScript strings from LOCALE_PATHS . 管理コマンド call_command() now returns the value returned from the command.handle() method. The new check --fail-level option allows specif ...
https://man.mtool.work/django/6.1/releases/1.10.html
クラスベースのビューでフォームを扱う 8623
クラスベースのビューでフォームを扱う フォームの処理には、一般に3つの場合分けが存在します。 最初の GET リクエスト (空白またはデフォルト値が埋め込まれたフォームを返す) 無効なデータの POST リクエスト (よくあるパターンは、エラー表示を追加したフ ... e_name = "contact.html" form_class = ContactForm success_url = "/thanks/" def form_valid ( self , form ): # This method is called when valid form data has been POSTed. # It should return an HttpResponse. form . send_email () return super () . form_va ... トするというものです。 モデルフォーム Generic views really shine when working with models. These generic views will automatically create a ModelForm , so long as they can work out which model class to use: model 属性が与えられた場合には、そのモデルクラ ... エリセットに対するモデルが使用されます。 Model form views provide a form_valid() implementation that saves the model automatically. You can override this if you have any special requirements; see below for examples. You don't even need to provide a suc ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-editing.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT