per page, with , order by , clip by
Results of 1 - 10 of about 150 for datetime (0.011 sec.)
タイムゾーン — Django 6.1 ドキュメント 11971
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » タイムゾーン ¶ 概要 ¶ タイムゾーンのサポートが有効な場合、Django は日時情報をデータベースには UTC で保存し、内部ではタイムゾーンを意識した(aware な ... ) datetime オブジェクトを使用します。フォームではそれをエンドユーザーのタイムゾーンに変換して表示します。テンプレートでは デフォルトの ... 題と格闘している場合は、 タイムゾーンの FAQ を参照してください。 コンセプト ¶ native と aware の日時オブジェクト ¶ Python の datetime.datetime のオブジェクトには、タイムゾーン情報を保持するために使える tzinfo 属性があり、これは datetime.tzinfo のサブクラス ... のインスタンスで表されます。 この属性がセットされオフセットを示すとき、datetime オブジェクトは aware (タイムゾーンを意識した日時) となります。それ以外の場合は naive (タイムゾーンを意識しない素朴な日時) ...
https://man.mtool.work/django/6.1/topics/i18n/timezones.html
タイムゾーン — Django 6.1 ドキュメント 11971
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » タイムゾーン ¶ 概要 ¶ タイムゾーンのサポートが有効な場合、Django は日時情報をデータベースには UTC で保存し、内部ではタイムゾーンを意識した(aware な ... ) datetime オブジェクトを使用します。フォームではそれをエンドユーザーのタイムゾーンに変換して表示します。テンプレートでは デフォルトの ... 題と格闘している場合は、 タイムゾーンの FAQ を参照してください。 コンセプト ¶ native と aware の日時オブジェクト ¶ Python の datetime.datetime のオブジェクトには、タイムゾーン情報を保持するために使える tzinfo 属性があり、これは datetime.tzinfo のサブクラス ... のインスタンスで表されます。 この属性がセットされオフセットを示すとき、datetime オブジェクトは aware (タイムゾーンを意識した日時) となります。それ以外の場合は naive (タイムゾーンを意識しない素朴な日時) ...
https://man.mtool.work/django/6.1/topics/i18n/timezones.html
データベース関数 — Django 6.1 ドキュメント 11924
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベース関数 ¶ The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggrega ... 、明示的に正しいデータベース型にキャストされない限り、不正な型に変換される可能性があります: >>> 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 ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
データベース関数 — Django 6.1 ドキュメント 11924
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベース関数 ¶ The classes documented below provide a way for users to use functions provided by the underlying database as annotations, aggrega ... 、明示的に正しいデータベース型にキャストされない限り、不正な型に変換される可能性があります: >>> 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 ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
フォーム フィールド — Django 6.1 ドキュメント 7832
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム フィールド ¶ class Field [ソース] ¶ Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの ... ed.'], 'name': ['This field is required.']} 定数の代わりに、任意の呼び出し可能オブジェクトを渡すこともできます: >>> import datetime >>> class DateForm ( forms . Form ): ... day = forms . DateField ( initial = datetime . date . today ) ... >>> print ( Dat ... eField ¶ class DateField ( ** kwargs ) [ソース] ¶ デフォルトのウィジェット: DateInput 空の値: None 正規化後の値: Python の datetime.date オブジェクトになります。 与えられた値が datetime.date 、 datetime.datetime または特定の日付の表示形式のどれかに当ては ... るか検証します。 エラーメッセージのキー: required 、 invalid 1 つの省略可能な引数を取ります: input_formats ¶ 文字列を有効な datetime.date オブジェクトに変換しようとする際に使用されるフォーマットのイテラブル。 input_formats 引数が指定されていない場合、デフ ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
フォーム フィールド — Django 6.1 ドキュメント 7832
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォーム フィールド ¶ class Field [ソース] ¶ Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの ... ed.'], 'name': ['This field is required.']} 定数の代わりに、任意の呼び出し可能オブジェクトを渡すこともできます: >>> import datetime >>> class DateForm ( forms . Form ): ... day = forms . DateField ( initial = datetime . date . today ) ... >>> print ( Dat ... eField ¶ class DateField ( ** kwargs ) [ソース] ¶ デフォルトのウィジェット: DateInput 空の値: None 正規化後の値: Python の datetime.date オブジェクトになります。 与えられた値が datetime.date 、 datetime.datetime または特定の日付の表示形式のどれかに当ては ... るか検証します。 エラーメッセージのキー: required 、 invalid 1 つの省略可能な引数を取ります: input_formats ¶ 文字列を有効な datetime.date オブジェクトに変換しようとする際に使用されるフォーマットのイテラブル。 input_formats 引数が指定されていない場合、デフ ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
ビューを記述する — Django 6.1 ドキュメント 7739
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ビューを記述する ¶ ビュー関数、つまり view は、Web リクエストを受け取って Web レスポンスを返すPython 関数です。 このレスポンスは、WebページのHTMLコン ... ルなビュー ¶ 以下は、HTML ドキュメントとして、現在の日付と時刻を返すビューです: from django.http import HttpResponse import datetime def current_datetime ( request ): now = datetime . datetime . now () html = '<html lang="en"><body>It is now %s .</body></ ... html>' % now return HttpResponse ( html ) 1 行ずつコードを見ていきましょう: 最初に、Python の datetime ライブラリ とともに、クラス HttpResponse を django.http モジュールからインポートします。 次に、 current_datetime という関数 ... ビュー関数の名前は重要ではありません; Django が識別するために特別な方法で名前を付ける必要はありません。ここでは、 current_datetime という名前はその機能を的確に表しているので、ビュー関数を current_datetime と呼ぶことにします。 このビューは、生成されたレス ...
https://man.mtool.work/django/6.1/topics/http/views.html
ビューを記述する — Django 6.1 ドキュメント 7692
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ビューを記述する ¶ ビュー関数、つまり view は、Web リクエストを受け取って Web レスポンスを返すPython 関数です。 このレスポンスは、WebページのHTMLコン ... ルなビュー ¶ 以下は、HTML ドキュメントとして、現在の日付と時刻を返すビューです: from django.http import HttpResponse import datetime def current_datetime ( request ): now = datetime . datetime . now () html = '<html lang="en"><body>It is now %s .</body></ ... html>' % now return HttpResponse ( html ) 1 行ずつコードを見ていきましょう: 最初に、Python の datetime ライブラリ とともに、クラス HttpResponse を django.http モジュールからインポートします。 次に、 current_datetime という関数 ... ビュー関数の名前は重要ではありません; Django が識別するために特別な方法で名前を付ける必要はありません。ここでは、 current_datetime という名前はその機能を的確に表しているので、ビュー関数を current_datetime と呼ぶことにします。 このビューは、生成されたレス ...
https://man.mtool.work/django/6.1/topics/http/views.html
ファイルストレージ API — Django 6.1 ドキュメント 7283
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ファイルストレージ API ¶ デフォルトのストレージクラスの取得 ¶ Djangoでは、デフォルトストレージクラスにアクセスするための便利な方法を提供しています。 ... るフラグです。デフォルトは False です。 get_created_time ( name ) [ソース] ¶ システムの ctime、つまり os.path.getctime() の datetime を返します。一部のシステム(例えば Unix)では、これは最後のメタデータ変更の時間ですが、他のシステム(例えば Windows)では、ファ ... のストレージシステムが継承または必要に応じてオーバーライドできる一連のデフォルト動作を提供します。 注釈 メソッドが naive な datetime オブジェクトを返す場合、実際に使用されるタイムゾーンは os.environ['TZ'] の現在の値になります。これは通常、Djangoの TIME_ZO ... レージシステム内ですでに存在する場合、 True を返します。 get_accessed_time ( name ) [ソース] ¶ ファイルの最終アクセス時刻を datetime で返します。最終アクセス時刻を返すことができないストレージシステムの場合は NotImplementedError を発生させます。 USE_TZ が ...
https://man.mtool.work/django/6.1/ref/files/storage.html
ファイルストレージ API — Django 6.1 ドキュメント 7236
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ファイルストレージ API ¶ デフォルトのストレージクラスの取得 ¶ Djangoでは、デフォルトストレージクラスにアクセスするための便利な方法を提供しています。 ... るフラグです。デフォルトは False です。 get_created_time ( name ) [ソース] ¶ システムの ctime、つまり os.path.getctime() の datetime を返します。一部のシステム(例えば Unix)では、これは最後のメタデータ変更の時間ですが、他のシステム(例えば Windows)では、ファ ... のストレージシステムが継承または必要に応じてオーバーライドできる一連のデフォルト動作を提供します。 注釈 メソッドが naive な datetime オブジェクトを返す場合、実際に使用されるタイムゾーンは os.environ['TZ'] の現在の値になります。これは通常、Djangoの TIME_ZO ... レージシステム内ですでに存在する場合、 True を返します。 get_accessed_time ( name ) [ソース] ¶ ファイルの最終アクセス時刻を datetime で返します。最終アクセス時刻を返すことができないストレージシステムの場合は NotImplementedError を発生させます。 USE_TZ が ...
https://man.mtool.work/django/6.1/ref/files/storage.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT