per page, with , order by , clip by
Results of 1 - 10 of about 27 for month (0.008 sec.)
クラスベースのジェネリックビュー: フラットインデックス 14302
クラスベースのジェネリックビュー: フラットインデックス この索引は、クラスベースビューのリファレンス文書を、異なる観点から編成したものです。ビューごとに、クラスツリーの有効な属性とメソッドが表されます。動作を定義するクラスの観点から編集された ... s() get_dated_queryset() get_paginator() head() http_method_not_allowed() paginate_queryset() render_to_response() setup() MonthArchiveView class MonthArchiveView 属性 (とオプションのアクセサ): allow_empty [ get_allow_empty() ] allow_future [ get_allo ... pe context_object_name [ get_context_object_name() ] date_field [ get_date_field() ] extra_context http_method_names model month [ get_month() ] month_format [ get_month_format() ] ordering [ get_ordering() ] paginate_by [ get_paginate_by() ] paginate ... ) ] メソッド as_view() dispatch() get() get_context_data() get_date_list() get_dated_items() get_dated_queryset() get_next_month() get_paginator() get_previous_month() head() http_method_not_allowed() paginate_queryset() render_to_response() setup() W ...
https://man.mtool.work/django/6.1/ref/class-based-views/flattened-index.html
ジェネリック日付ビュー 12360
ジェネリック日付ビュー 日付ベースのジェネリックビュー ( django.views.generic.dates 内で提供されています) は、日付ベースのデータのために、ドリルダウンページを描画するためのビューです。 注釈 このページの例のいくつかは、 myapp/models.py 内で下 ... h1 > {% for obj in object_list %} < p > {{ obj.title }} - {{ obj.pub_date | date :"F j, Y" }} </ p > {% endfor %} </ div > MonthArchiveView class MonthArchiveView [ソース] 与えられた月の中で有効な全オブジェクトを表示する、月次のアーカイブページです。 ... ic.list.MultipleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseMonthArchiveView django.views.generic.dates.YearMixin django.views.generic.dates.MonthMixin django.views.generic.dates.BaseDateL ... queryset に従って、与えられた月にオブジェクトが利用可能な全ての日を、 datetime.datetime オブジェクトとして昇順で表します。 month : 与えられた月を表す date オブジェクト。 next_month : allow_empty と allow_future に従って、次の月の最初の日を表す date オ ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-date-based.html
日付ベースのミックスイン (mixin) 10286
日付ベースのミックスイン (mixin) 注釈 これらのミックスインに含まれるすべての日付フォーマット属性は strftime() フォーマット文字列を使用します。 now テンプレートタグのフォーマット文字列は互換性がないので使用しないでください。 YearMixin class ... ジェクトを返します。この関数は allow_empty と allow_future の値によって None を返したり、 Http404 例外を発生させたりします。 MonthMixin class MonthMixin [ソース] 日付の「月」コンポーネントのパース情報を取得したり提供したりするために使用できるミックスイン ... 。 メソッドと属性 month_format strftime() フォーマットは月をパースするときに使われます。デフォルトでは '%b' です。 month オプション 月を表す文字列 ... 。デフォルトでは None に設定されています。これは月が他の方法で決定されることを意味します。 get_month_format () [ソース] 月をパースする際に使用する strftime() フォーマットを返します。デフォルトでは month_format を返します。 ...
https://man.mtool.work/django/6.1/ref/class-based-views/mixins-date-based.html
データベース関数 9117
データベース関数 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 ... :30:01.000321+00:00 が渡されると、組み込みの lookup_name は下記の値を返します: "year": 2015 "iso_year": 2015 "quarter": 2 "month": 6 "day": 15 "week": 25 "week_day": 2 "iso_week_day": 1 "hour": 23 "minute": 30 "second": 1 Australia/Melbourne のような異 ... pression , tzinfo = None , ** extra ) [ソース] ISO-8601 の週番号を持つ年を返します。 lookup_name = 'iso_year' class ExtractMonth ( expression , tzinfo = None , ** extra ) [ソース] lookup_name = 'month' class ExtractDay ( expression , tzinfo = None , * ... ができます: >>> from datetime import UTC , datetime >>> from django.db.models.functions import ( ... ExtractDay , ... ExtractMonth , ... ExtractQuarter , ... ExtractWeek , ... ExtractIsoWeekDay , ... ExtractWeekDay , ... ExtractIsoYear , ... ExtractYear ...
https://man.mtool.work/django/6.1/ref/models/database-functions.html
条件式 8969
条件式 Conditional expressions let you use if ... elif ... else logic within filters, annotations, aggregations, and updates. A conditional expression evaluates a series of conditions for each row of a table and returns the matching result ... エリを修正して、 Client が私たちとどれくらいの期間、関係があるかに基づいて割引を得るには、ルックアップが使用できます: >>> a_month_ago = date . today () - timedelta ( days = 30 ) >>> a_year_ago = date . today () - timedelta ( days = 365 ) >>> # Get the ... discount = Case ( ... When ( registered_on__lte = a_year_ago , then = Value ( "10%" )), ... When ( registered_on__lte = a_month_ago , then = Value ( "5%" )), ... default = Value ( "0%" ), ... ) ... ) . values_list ( "name" , "discount" ) <QuerySet [( ... ます。たとえば、1ヶ月以上前に登録されたゴールドクライアントと1年以上前に登録されたプラチナクライアントを検索する場合: >>> a_month_ago = date . today () - timedelta ( days = 30 ) >>> a_year_ago = date . today () - timedelta ( days = 365 ) >>> Client . o ...
https://man.mtool.work/django/6.1/ref/models/conditional-expressions.html
ウィジェット 8689
ウィジェット ウィジェットは、Django が HTML の input 要素の表現方法です。ウィジェットは、HTML のレンダリングをコントロールして、ウィジェットに合致する GET/POST ディクショナリからデータを取り出します。 Built-in widgets によって作られる HTML ... ectorWidget ( forms . MultiWidget ): def __init__ ( self , attrs = None ): days = { day : day for day in range ( 1 , 32 )} months = { month : month for month in range ( 1 , 13 )} years = { year : year for year in [ 2018 , 2019 , 2020 ]} widgets = [ fo ... rms . Select ( attrs = attrs , choices = days ), forms . Select ( attrs = attrs , choices = months ), forms . Select ( attrs = attrs , choices = years ), ] super () . __init__ ( widgets , attrs ) def decompress ( self , ... value ): if isinstance ( value , date ): return [ value . day , value . month , value . year ] elif isinstance ( value , str ): year , month , day = value . split ( "-" ) return [ day , month , year ] ...
https://man.mtool.work/django/6.1/ref/forms/widgets.html
URL ディスパッチャ 8492
URL ディスパッチャ すっきりした、簡潔で明解な URL スキームは、高品質な Web アプリケーションでは重要な要素です。 Django では、フレームワークの制限なしに、望み通りの URL を設計できます。 URL はすっきりした扱いやすいものにすべきであるという主張 ... /" , views . special_case_2003 ), path ( "articles/<int:year>/" , views . year_archive ), path ( "articles/<int:year>/<int:month>/" , views . month_archive ), path ( "articles/<int:year>/<int:month>/<slug:slug>/" , views . article_detail ), ] メモ: UR ... cles です。 リクエストの例: articles/2005/03/ へのリクエストはリストの 3 番目のエントリにマッチします。Django は関数 views.month_archive(request, year=2005, month=3) を呼び出します。 /articles/2003/ はリストの最初のパターンにマッチしますが、2番目のパタ ... les/2003/03/building-a-django-site/ は最後のパターンにマッチします。Django は関数 views.article_detail(request, year=2003, month=3, slug="building-a-django-site") を呼び出します。 パス コンバータ デフォルトでは、以下のパスコンバータが使用可能です: str ...
https://man.mtool.work/django/6.1/topics/http/urls.html
翻訳 8146
翻訳 概要 Django プロジェクトを翻訳可能にするためには、Python コードやテンプレートに、多少のフックを加筆しなければなりません。このフックは 翻訳文字列 と呼ばれます。翻訳文字列は Django に「このテキストに対する翻訳が有効な場合、このテキストは ... の標準の名前付き補完構文によるプレースホルダを使えます。例えば: def my_view ( request , m , d ): output = _ ( "Today is %(month)s %(day)s ." ) % { "month" : m , "day" : d } return HttpResponse ( output ) このテクニックを使うと、言語ごとの翻訳でプレー ... , doesn't exist in 'msgid' 文脈マーカー Sometimes words have several meanings, such as "May" in English, which refers to a month name and to a verb. To enable translators to translate these words correctly in different contexts, you can use the django ... 現します)、これらそれぞれに対して翻訳者が異なる翻訳ができるようにします。 例: from django.utils.translation import pgettext month = pgettext ( "month name" , "May" ) もしくは: from django.db import models from django.utils.translation import pgettext_l ...
https://man.mtool.work/django/6.1/topics/i18n/translation.html
Django の概要 8080
Django の概要 Django は変転の激しいニュースルーム環境で開発された経緯から、よくある Web 開発タスクを迅速かつ簡単化するように設計されています。ここでは Django による データベースを使った Web アプリケーション開発をざっと見てみましょう。 このド ... om . import views urlpatterns = [ path ( "articles/<int:year>/" , views . year_archive ), path ( "articles/<int:year>/<int:month>/" , views . month_archive ), path ( "articles/<int:year>/<int:month>/<int:pk>/" , views . article_detail ), ] 上のコードは ... ユーザが "/articles/2005/05/39323/" という URL をリクエストすると、 Django は news.views.article_detail(request, year=2005, month=5, pk=39323) のような関数呼び出しを行います。 ビューの自作 各ビューには二つの役割があります: 一つはリクエストされたページの ...
https://man.mtool.work/django/6.1/intro/overview.html
Django 1.10.6 リリースノート 8080
Django 1.10.6 リリースノート March 1, 2017 Django 1.10.6 fixes several bugs in 1.10.5. バグ修正 Fixed ClearableFileInput 's "Clear" checkbox on model form fields where the model field has a default ( #27805 ). Fixed RequestDataTooBig and To ... ld from DateField ( #27828 ). Fixed query expression date subtraction accuracy on PostgreSQL for differences larger than a month ( #27856 ). Fixed a GDALException raised by GDALClose on GDAL ≥ 2.0 ( #27479 ). ...
https://man.mtool.work/django/6.1/releases/1.10.6.html
PREV 1 2 3 NEXT