per page, with , order by , clip by
Results of 1 - 10 of about 121 for length (0.007 sec.)
データベース関数 11078
データベース関数 The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggregations, or filters in Django. Functions are also expressions , so they can be used and combined ... considerations. 各関数の例では、以下のモデルを使用します: class Author ( models . Model ): name = models . CharField ( max_length = 50 ) age = models . PositiveIntegerField ( null = True , blank = True ) alias = models . CharField ( max_length = 50 , n ... ull = True , blank = True ) goes_by = models . CharField ( max_length = 50 , null = True , blank = True ) 通常、 CharField に null=True を許可することはお勧めしません。なぜなら、これはフィール ... 数値フィールドまたは式を受け取り、その式のテキスト表現を1文字として返します。Python の chr() 関数と同じように動作します。 Length と同様に、 IntegerField のトランスフォームとして登録できます。デフォルトのルックアップ名は chr です。 使用例: >>> from dja ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
モデル 10768
モデル モデルは、データに関する唯一かつ決定的な情報源です。あなたが保持するデータが必要とするフィールドとその動作を定義します。一般的に、各モデルは単一のデータベースのテーブルに対応付けられます。 基本: モデルは各々 Python のクラスであり dja ... モデルを定義しています。 from django.db import models class Person ( models . Model ): first_name = models . CharField ( max_length = 30 ) last_name = models . CharField ( max_length = 30 ) first_name および last_name はこのモデルの フィールド です。各フ ... してください。 実装例: from django.db import models class Musician ( models . Model ): first_name = models . CharField ( max_length = 50 ) last_name = models . CharField ( max_length = 50 ) instrument = models . CharField ( max_length = 100 ) class Album ... models . Model ): artist = models . ForeignKey ( Musician , on_delete = models . CASCADE ) name = models . CharField ( max_length = 100 ) release_date = models . DateField () num_stars = models . IntegerField () フィールドの型 モデル内の各フィールドは、 ...
https://man.mtool.work/django/6.1/topics/db/models.html
フォーム フィールド 9430
フォーム フィールド class Field [ソース] Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの検証ロジックがあり、他にいくつかのフックもあります。 Field. clean ( value ) [ソース] Field クラス ... ています: >>> from django import forms >>> class HelpTextContactForm ( forms . Form ): ... subject = forms . CharField ( max_length = 100 , help_text = "100 characters max." ) ... message = forms . CharField () ... contact_email = forms . EmailField ( he ... = False ) >>> print ( f ) <div>Subject:<div class="helptext">100 characters max.</div><input type="text" name="subject" maxlength="100" required></div> <div>Message:<input type="text" name="message" required></div> <div>Contact email:<div class="helpte ... xt">Your email (so we can reply).</div><input type="email" name="contact_email" maxlength="320" required></div> フィールドにヘルプテキストがある場合、それは aria-describedby HTML 属性を使用して入力と関連付けられま ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
モデルフィールドリファレンス 9330
モデルフィールドリファレンス このドキュメントには、Django が提供するフィールドオプション field options とフィールド型 field types を含む、 Field のすべての API リファレンスが記載されています。 注釈 フィールドは django.db.models.fields に定義 ... els . Model ): amount = models . DecimalField ( max_digits = 10 , decimal_places = 2 ) currency = models . CharField ( max_length = 3 , choices = get_currencies ) choice に呼び出し可能オブジェクトを渡すと、例えば選択肢が以下のような場合に特に便利です: ... "Sophomore" , JUNIOR : "Junior" , SENIOR : "Senior" , GRADUATE : "Graduate" , } year_in_school = models . CharField ( max_length = 2 , choices = YEAR_IN_SCHOOL_CHOICES , default = FRESHMAN , ) def is_upperclass ( self ): return self . year_in_school i ... _ ( "Junior" ) SENIOR = "SR" , _ ( "Senior" ) GRADUATE = "GR" , _ ( "Graduate" ) year_in_school = models . CharField ( max_length = 2 , choices = YearInSchool , default = YearInSchool . FRESHMAN , ) def is_upperclass ( self ): return self . year_in_sch ...
https://man.mtool.work/django/6.1/ref/models/fields.html
Coding style 9120
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 ... s only a guide, so respect the style of the surrounding code as a primary goal. An exception to PEP 8 is our rules on line lengths. We allow up to 88 characters in code, as this is the line length used by black . Documentation, comments, and docstrings ... e, using underscores instead of camelCase. Do this: class Person ( models . Model ): first_name = models . CharField ( max_length = 20 ) last_name = models . CharField ( max_length = 40 ) Don't do this: class Person ( models . Model ): FirstName = mode ... ls . CharField ( max_length = 20 ) Last_Name = models . CharField ( max_length = 40 ) The class Meta should appear after the fields are defined, with ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
Djangoにおけるパスワード管理 8909
Djangoにおけるパスワード管理 パスワード管理は一般的に、不必要に再発明されるべきではないものです。Djangoはユーザーのパスワードを管理するための安全で柔軟なツールセットを提供するよう努めています。このドキュメントでは、Djangoがパスワードを保存す ... auth.password_validation.UserAttributeSimilarityValidator" , }, { "NAME" : "django.contrib.auth.password_validation.MinimumLengthValidator" , "OPTIONS" : { "min_length" : 9 , }, }, { "NAME" : "django.contrib.auth.password_validation.CommonPasswordValid ... バリデータを有効化します。 UserAttributeSimilarityValidator は、パスワードとユーザの属性との類似性をチェックします。 MinimumLengthValidator は、パスワードが最小の長さを満たしているかをチェックします。このバリデータはカスタムオプションで構成されます。現在 ... RS に記載されているソート順に返されます。 Django に含まれるバリデータ Django には 4 つのバリデータがあります: class MinimumLengthValidator ( min_length = 8 ) [ソース] パスワードが最小限の長さであることを検証します。最小の長さは min_length パラメータでカ ...
https://man.mtool.work/django/6.1/topics/auth/passwords.html
Django 1.4.8 リリースノート 8810
Django 1.4.8 リリースノート September 14, 2013 Django 1.4.8 fixes two security issues present in previous Django releases in the 1.4 series. Denial-of-service via password hashers In previous versions of Django, no limit was imposed on the ... plaintext length of a password. This allowed a denial-of-service attack through submission of bogus but extremely large passwords, tying up ... server resources performing the (expensive, and increasingly expensive with the length of the password) calculation of the corresponding hash. As of 1.4.8, Django's authentication framework imposes a 4096-byte ... limit on passwords and will fail authentication with any submitted password of greater length. Corrected usage of sensitive_post_parameters() in django.contrib.auth 's admin The decoration of the add_view and user_ch ...
https://man.mtool.work/django/6.1/releases/1.4.8.html
Django 1.5.4リリースノート 8599
Django 1.5.4リリースノート September 14, 2013 This is Django 1.5.4, the fourth release in the Django 1.5 series. It addresses two security issues and one bug. Denial-of-service via password hashers In previous versions of Django, no limit w ... as imposed on the plaintext length of a password. This allowed a denial-of-service attack through submission of bogus but extremely large passwords, tying up ... server resources performing the (expensive, and increasingly expensive with the length of the password) calculation of the corresponding hash. As of 1.5.4, Django's authentication framework imposes a 4096-byte ... limit on passwords, and will fail authentication with any submitted password of greater length. Corrected usage of sensitive_post_parameters() in django.contrib.auth 's admin The decoration of the add_view and user_ch ...
https://man.mtool.work/django/6.1/releases/1.5.4.html
マネージャ 8599
マネージャ class Manager [ソース] マネージャ (Manager) とは、Django のモデルに対するデータベースクエリの操作を提供するインターフェイスです。Django アプリケーション内の1つのモデルに対して、 Manager は最低でも1つは存在します。 Manager クラスの ... = Coalesce ( models . Count ( "response" ), 0 )) class OpinionPoll ( models . Model ): question = models . CharField ( max_length = 200 ) objects = PollManager () class Response ( models . Model ): poll = models . ForeignKey ( OpinionPoll , on_delete = ... とえば、このモデルの例では...: from django.db import models class Book ( models . Model ): title = models . CharField ( max_length = 100 ) author = models . CharField ( max_length = 50 ) Book.objects.all() は、データベース内の全ての本を返します。 Manage ... ald Dahl" ) # Then hook it into the Book model explicitly. class Book ( models . Model ): title = models . CharField ( max_length = 100 ) author = models . CharField ( max_length = 50 ) objects = models . Manager () # The default manager. dahl_objects ...
https://man.mtool.work/django/6.1/topics/db/managers.html
JavaScript code 8290
JavaScript code While most of Django core is Python, the admin and gis contrib apps contain JavaScript code. Please follow these coding standards when writing JavaScript code for inclusion in Django. Code style Please conform to the indenta ... click' , function ( assert ) { const $ = django . jQuery ; removeOnClick ( '.button' ); assert . equal ( $ ( '.button' ). length , 1 ); $ ( '.button' ). click (); assert . equal ( $ ( '.button' ). length , 0 ); }); QUnit . test ( 'copyOnClick adds but ... on click' , function ( assert ) { const $ = django . jQuery ; copyOnClick ( '.button' ); assert . equal ( $ ( '.button' ). length , 1 ); $ ( '.button' ). click (); assert . equal ( $ ( '.button' ). length , 2 ); }); Please consult the QUnit documentati ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/javascript...
PREV 1 2 3 4 5 6 7 8 9 10 NEXT