per page, with , order by , clip by
Results of 1 - 10 of about 48 for DateTimeField (0.007 sec.)
データベース関数 15555
データベース関数 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 ... 、明示的に正しいデータベース型にキャストされない限り、不正な型に変換される可能性があります: >>> from django.db.models import DateTimeField >>> from django.db.models.functions import Cast , Coalesce >>> from django.utils import timezone >>> now = timezone . now ... () >>> Coalesce ( "updated" , Cast ( now , DateTimeField ())) Collate class Collate ( expression , collation ) [ソース] クエリに使用する式と照合順序名 (collation name) を指定します ... するとデータベースエラーになります。 使用例: class Blog ( models . Model ): body = models . TextField () modified = models . DateTimeField ( auto_now = True ) class Comment ( models . Model ): body = models . TextField () modified = models . DateTimeField ( aut ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
モデル _meta API 11193
モデル _meta API class Options [ソース] モデルの _meta API は、Django ORM のコアにあります。これにより、ルックアップ、クエリ、フォーム、admin などのシステムの他のパーツは、各モデルの機能を理解できるようになります。API は、各モデルクラスの _ ... ogentry>, <django.db.models.fields.AutoField: id>, <django.db.models.fields.CharField: password>, <django.db.models.fields.DateTimeField: last_login>, <django.db.models.fields.BooleanField: is_superuser>, <django.db.models.fields.CharField: username>, <django ... ango.db.models.fields.BooleanField: is_staff>, <django.db.models.fields.BooleanField: is_active>, <django.db.models.fields.DateTimeField: date_joined>, <django.db.models.fields.related.ManyToManyField: groups>, <django.db.models.fields.related.ManyToManyField ... ogentry>, <django.db.models.fields.AutoField: id>, <django.db.models.fields.CharField: password>, <django.db.models.fields.DateTimeField: last_login>, <django.db.models.fields.BooleanField: is_superuser>, <django.db.models.fields.CharField: username>, <django ...
https://man.mtool.work/django/6.1/ref/models/meta.html
モデルフィールドリファレンス 9527
モデルフィールドリファレンス このドキュメントには、Django が提供するフィールドオプション field options とフィールド型 field types を含む、 Field のすべての API リファレンスが記載されています。 注釈 フィールドは django.db.models.fields に定義 ... ような、データベースに直接アクセスできる人のために、フィールドをドキュメント化するのに便利です。例えば: pub_date = models . DateTimeField ( db_comment = "Date and time when the article was published" , ) db_default Field. db_default データベースによって計算され ... るこのフィールドのデフォルト値。これはリテラル値でも、 Now のようなデータベース関数でも構いません: created = models . DateTimeField ( db_default = Now ()) リテラルやデータベース関数から構成する限り、より複雑な式を使用できます: month_due = models . DateFi ... い。なぜなら unique がインデックスの作成を意味するからです。 unique_for_date Field. unique_for_date これを DateField または DateTimeField の名前に設定すると、このフィールドが日付フィールドの値に対して一意であることを要求します。 例えば、 title フィールドに uni ...
https://man.mtool.work/django/6.1/ref/models/fields.html
Django 1.6 リリースノート 9527
Django 1.6 リリースノート 注釈 Dedicated to Malcolm Tredinnick On March 17, 2013, the Django project and the free software community lost a very dear friend and developer. Malcolm was a long-time contributor to Django, a model community mem ... med in UTC. This limitation was lifted in Django 1.6. Use QuerySet.datetimes() to perform time zone aware aggregation on a DateTimeField . Support for savepoints in SQLite Django 1.6 adds support for savepoints in SQLite, with some limitations . BinaryField m ... used to return a list of datetime . QuerySet.datetimes() returns a list of datetime . QuerySet.dates() no longer usable on DateTimeField QuerySet.dates() raises an error if it's used on DateTimeField when time zone support is active. Use QuerySet.datetimes() ... uires time zone definitions The date_hierarchy feature of the admin now relies on QuerySet.datetimes() when it's used on a DateTimeField . This requires time zone definitions in the database when USE_TZ is True . Learn more . date_list in generic views requir ...
https://man.mtool.work/django/6.1/releases/1.6.html
Django 1.10.4 リリースノート 8906
Django 1.10.4 リリースノート 2016年12月1日 Django 1.10.4 fixes several bugs in 1.10.3. バグ修正 クエリー内の Oracle のテストユーザーのパスワードをクオートしました。これは、パスワードの先頭が数字または特別な文字から始まる場合に発生する、"ORA ... ent reverse relationships in multi-table inheritance ( #27407 ). Fixed a QuerySet.update() crash on SQLite when updating a DateTimeField with an F() expression and a timedelta ( #27544 ). Prevented LocaleMiddleware from redirecting on URLs that should return ...
https://man.mtool.work/django/6.1/releases/1.10.4.html
Django 3.0.4 リリースノート 8694
Django 3.0.4 リリースノート March 4, 2020 Django 3.0.4では、3.0.3にあったセキュリティの問題といくつかのバグを修正しました。 CVE-2020-9402: Potential SQL injection via tolerance parameter in GIS functions and aggregates on Oracle GIS functio ... 31271 ). Fixed a regression in Django 3.0.3 that caused misplacing parameters of SQL queries when subtracting DateField or DateTimeField expressions on MySQL ( #31312 ). Fixed a regression in Django 3.0 that didn't include subqueries spanning multivalued rela ...
https://man.mtool.work/django/6.1/releases/3.0.4.html
はじめての Django アプリ作成、その 2 8482
はじめての Django アプリ作成、その 2 このチュートリアルは チュートリアルその 1 の続きです。ここでは、データベースをセットアップして、最初のモデルを作成し、そして Django が自動的に生成してくれる管理サイトについて、簡単なイントロダクションをし ... port models class Question ( models . Model ): question_text = models . CharField ( max_length = 200 ) pub_date = models . DateTimeField ( "date published" ) class Choice ( models . Model ): question = models . ForeignKey ( Question , on_delete = models . CAS ... 表現しています。 各フィールドは Field クラスのインスタンスとして表現されています。例えば、 CharField は文字のフィールドで、 DateTimeField は日時フィールドです。こうしたクラスは、各フィールドにどのようなデータ型を記憶させるかを Django に教えます。 Field インスタ ... 集してみましょう: 以下の点に注意してください: フォームは Question モデルから自動的に生成されます。 モデルのフィールドの型 ( DateTimeField 、 CharField など) はそれぞれ異なる HTML 入力ウィジェットと対応しています。各種のフィールドは、自分自身を Django admin サイ ...
https://man.mtool.work/django/6.1/intro/tutorial02.html
PostgreSQL 固有のデータベース制約 8482
PostgreSQL 固有のデータベース制約 PostgreSQL は django.contrib.postgres.constraints モジュールから利用できる追加のデータ整合性制約をサポートしています。これらはモデル Meta.constraints オプションで追加されます。 ExclusionConstraint class Exc ... lass Reservation ( models . Model ): room = models . ForeignKey ( "Room" , on_delete = models . CASCADE ) start = models . DateTimeField () end = models . DateTimeField () cancelled = models . BooleanField ( default = False ) class Meta : constraints = [ Excl ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/constraints.html
Django 3.1 リリースノート 8269
Django 3.1 リリースノート August 4, 2020 Django 3.1 へようこそ! このリリースノートでは、 バージョン 3.1 の新機能 と、Django 3.0 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... can be used by widgets to access model instances. See リレーションシップの選択肢をイテレートする for details. django.forms.DateTimeField now accepts dates in a subset of ISO 8601 datetime formats, including optional timezone, e.g. 2019-10-10T06:47 , 2019-10-1 ... ill always be retained if provided, with timezone-aware datetimes being returned even when USE_TZ is False . Additionally, DateTimeField now uses DATE_INPUT_FORMATS in addition to DATETIME_INPUT_FORMATS when converting a field input to a datetime value. Multi ... SQL to reset sequences on SQLite. モデル The new ExtractIsoWeekDay function extracts ISO-8601 week days from DateField and DateTimeField , and the new iso_week_day lookup allows querying by an ISO-8601 day of week. QuerySet.explain() now supports: TREE format ...
https://man.mtool.work/django/6.1/releases/3.1.html
タイムゾーン 8269
タイムゾーン 概要 タイムゾーンのサポートが有効な場合、Django は日時情報をデータベースには UTC で保存し、内部ではタイムゾーンを意識した(aware な) datetime オブジェクトを使用します。フォームではそれをエンドユーザーのタイムゾーンに変換して表 ... ードを見つけやすくするために、Django は naive な datetime をデータベースに保存しようとすると警告を出します: RuntimeWarning: DateTimeField ModelName.field_name received a naive datetime (2012-01-01 00:00:00) while time zone support is active. 開発中、以下を設定 ... 例外として発生するように変更し、トラックバックを得ることができます: import warnings warnings . filterwarnings ( "error" , r "DateTimeField .* received a naive datetime" , RuntimeWarning , r "django\.db\.models\.fields" , ) フィクスチャ (fixture) aware な日時をシ ... オフセットが含まれます: "2011-09-01T13:20:30+03:00" しかし、naive な日付の場合はそうではありません: "2011-09-01T13:20:30" DateTimeField を使ったモデルに対しては、この違いにより、タイムゾーンサポートのありとなし両方に対して動作するフィクスチャを記述することが ...
https://man.mtool.work/django/6.1/topics/i18n/timezones.html
PREV 1 2 3 4 5 NEXT