per page, with , order by , clip by
Results of 1 - 10 of about 27 for verbose (0.006 sec.)
モデルの Meta オプション 12063
モデルの Meta オプション このドキュメントでは、モデル内部の class Meta 内でモデルに与えられる、すべての可能な メタデータオプション を説明します。 利用可能な Meta オプション abstract Options. abstract abstract = True の場合、このモデルは 抽象 ... class Meta : constraints = [ models . CheckConstraint ( condition = models . Q ( age__gte = 18 ), name = "age_gte_18" ), ] verbose_name Options. verbose_name 人間が読めるオブジェクトの名前(単数形): verbose_name = "pizza" 指定されない場合、 Django はク ... ラス名を小文字にして使います。 CamelCase は camel case になります。 verbose_name_plural Options. verbose_name_plural オブジェクトの名前の複数形: verbose_name_plural = "stories" 指定されない場合、 Dj ... ango は verbose_name + "s" を使用します。 読み取り専用の Meta 属性 label Options. label オブジェクトの表現。 app_label.object_name を返しま ...
https://man.mtool.work/django/6.1/ref/models/options.html
翻訳 12063
翻訳 概要 Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文字列 と呼ばれます。翻訳文字列は Django に「このテキストに対する翻訳が有効な場合、このテキストは ... mport ngettext from myapp.models import Report count = Report . objects . count () if count == 1 : name = Report . _meta . verbose_name else : name = Report . _meta . verbose_name_plural text = ngettext ( "There is %(count)d %(name)s available." , "Ther ... vailable." , "There are %(count)d %(name)s objects available." , count , ) % { "count" : count , "name" : Report . _meta . verbose_name , } 注釈 ngettext() を使うときは、リテラルで挿入される全ての変数に対して単一の名前を使うようにしてください。以下の例で ... are %(count)d %(plural_name)s available." , count , ) % { "count" : Report . objects . count (), "name" : Report . _meta . verbose_name , "plural_name" : Report . _meta . verbose_name_plural , } django-admin compilemessages を実行すると、以下のエラーが発 ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
モデル 10549
モデル モデルは、データに関する唯一かつ決定的な情報源です。あなたが保持するデータが必要とするフィールドとその動作を定義します。一般的に、各モデルは単一のデータベースのテーブルに対応付けられます。 基本: モデルは各々 Python のクラスであり dja ... 、 primary_key=True が必ず 1 つだけ (明示的に宣言されるか、自動的に追加されるかのどちらかで) 存在する必要があります。 詳細 (verbose) なフィールド名 ForeignKey 、 ManyToManyField 、 OneToOneField を除くすべてのフィールド型は、任意の第 1 引数として "詳細な ... 名前 (verbose name)" を取ります。詳細な名前を指定しない場合、Django はフィールドの属性名のアンダースコアをスペースに変換したものを使って ... eld ( max_length = 30 ) ForeignKey 、 ManyToManyField 、 OneToOneField の 3 つは最初の引数にモデルクラスを必要とするので、 verbose_name キーワード引数を使用してください: poll = models . ForeignKey ( Poll , on_delete = models . CASCADE , verbose_name = " ...
https://man.mtool.work/django/6.1/topics/db/models.html
LayerMapping データインポートユーティリティ 10286
LayerMapping データインポートユーティリティ LayerMapping クラスは、ベクトル空間データファイル (例: shapefile) の内容を GeoDjango モデルにマッピングする方法を提供します。 このユーティリティは、ベクターレイヤーからジオメトリとフィールドを取り ... GC name. ... } # The mapping is a dictionary >>> lm = LayerMapping ( TestGeo , "test_poly.shp" , mapping ) >>> lm . save ( verbose = True ) # Save the layermap, imports the data. Saved: Name: 1 Saved: Name: 2 Saved: Name: 3 Here, LayerMapping transforme ... ンポートする際に使用するデータベースを設定します。デフォルトは 'default' です。 save() のキーワード引数 LayerMapping. save ( verbose = False , fid_range = False , step = False , progress = False , silent = False , stream = sys.stdout , strict = False ) [ソ ... model mapping will cease upon the first error encountered. The default value ( False ) behavior is to attempt to continue. verbose 設定された場合、データベース上で実行される各モデル保存の後に情報が出力されます。 トラブルシューティング メモリ不足 As note ...
https://man.mtool.work/django/6.1/ref/contrib/gis/layermapping.html
Coding style 9792
Coding style Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks pre-commit is a framework for managing pre-commit hooks. These hooks help to identify simple issues before committing code for re ... not be used for any string that may require translation, including error and logging messages. In general format() is more verbose, so the other formatting methods are preferred. Don't waste time doing unrelated refactoring of existing code to adjust th ... del ): first_name = models . CharField ( max_length = 20 ) last_name = models . CharField ( max_length = 40 ) class Meta : verbose_name_plural = "people" Don't do this: class Person ( models . Model ): class Meta : verbose_name_plural = "people" first_n ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
ロギングの設定と利用 9529
ロギングの設定と利用 参考 Django のロギング リファレンス Django のロギングの概要 Django はそのままで動作する デフォルトのロギング設定 を持っており、すぐに拡張可能です。 基本的なロギング呼び出しを作成する ログメッセージをコード内から送信する ... tter if you want to include additional data. First name and define your formatters - this example defines formatters named verbose and simple : LOGGING = { # ... "formatters" : { "verbose" : { "format" : " {name} {levelname} {asctime} {module} {process: ... ントリを追加します: "handlers" : { "file" : { "class" : "logging.FileHandler" , "filename" : "general.log" , "formatter" : "verbose" , }, } ロガーの名前空間を使う 無名のロギング設定 "" は任意の Python アプリケーションからログを取り込みます。名前付きロギン ...
https://man.mtool.work/django/6.1/howto/logging.html
管理アクション 9529
管理アクション Djangoの管理者の基本的な仕事は、一言で言えば、「オブジェクトを選択し、それを変更する」ことに尽きます。これは大多数のユースケースに当てはまります。しかし、一度に多くのオブジェクトに同じ変更を適用する必要がある場合、この仕事は退 ... ailable for details. Action description % -formatting support Action descriptions support % -formatting and may include '%(verbose_name)s' and '%(verbose_name_plural)s' placeholders. These are replaced with the model's verbose_name and verbose_name_plur ...
https://man.mtool.work/django/6.1/ref/contrib/admin/actions.html
アプリケーション 9035
アプリケーション Django には、設定の保存と調査の手段を提供するインストール済みアプリケーションのレジストリがあり、利用可能な モデル のリストもアクセスできます。 このレジストリは apps と呼ばれ、 django.apps で利用できます: >>> from django.ap ... ps import apps >>> apps . get_app_config ( "admin" ) . verbose_name 'Administration' プロジェクトとアプリケーション プロジェクト (project) という単語は、Django の web アプリケーションを ... でしょう: # rock_n_roll/apps.py from django.apps import AppConfig class RockNRollConfig ( AppConfig ): name = "rock_n_roll" verbose_name = "Rock 'n' roll" RockNRollConfig は INSTALLED_APPS が 'rock_n_roll' を含むときに自動的に読み込まれます。もしこれを防 ... うにします。 # anthology/apps.py from rock_n_roll.apps import RockNRollConfig class JazzManoucheConfig ( RockNRollConfig ): verbose_name = "Jazz Manouche" # anthology/settings.py INSTALLED_APPS = [ "anthology.apps.JazzManoucheConfig" , # ... ] この例では ...
https://man.mtool.work/django/6.1/ref/applications.html
Django の admin サイト 9035
Django の admin サイト Django のパワフルな特徴の1つは、自動的に生成される admin インタフェースです。あなたのモデルクラスからメタデータを読み取り、モデル中心のインタフェースを提供します。このインタフェースのおかげで、ユーザはあなたのサイトの ... ss PersonAdmin ( admin . ModelAdmin ): readonly_fields = [ "address_report" ] # description functions like a model field's verbose_name @admin . display ( description = "Address" ) def address_report ( self , instance ): # assuming get_full_address() re ... ェクトも含まれます。リストはテンプレート内で unordered_list フィルタを使ってフォーマットされます。 model_count は各モデルの verbose_name_plural と削除されるオブジェクトの数をマッピングした辞書です。 perms_needed は verbose_name のセットで、ユーザが削除す ... pages" ] InlineModelAdmin. template ページ上でインラインをレンダリングするのに使われるテンプレートです。 InlineModelAdmin. verbose_name モデル内部の Meta クラスの verbose_name のオーバーライドです。 InlineModelAdmin. verbose_name_plural モデル内部の Met ...
https://man.mtool.work/django/6.1/ref/contrib/admin/
Django 1.4.2 リリースノート 8772
Django 1.4.2 リリースノート October 17, 2012 This is the second security release in the Django 1.4 series. Host header poisoning Some parts of Django -- independent of end-user-written applications -- make use of full URLs, including domain ... constructor arguments have been adapted to match those of all other model fields. The first two keyword arguments are now verbose_name and name. Other bugfixes and changes Subclass HTMLParser only for appropriate Python versions (#18239). Added batch_s ...
https://man.mtool.work/django/6.1/releases/1.4.2.html
PREV 1 2 3 NEXT