per page, with , order by , clip by
Results of 1 - 10 of about 12 for Publisher (0.005 sec.)
組み込みのクラスベースのジェネリックビュー(汎用ビュー) — Django 6.1 ドキュメ... 12063
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 組み込みのクラスベースのジェネリックビュー(汎用ビュー) ¶ ウェブアプリケーションを書くのは、特定のパターンを何度も繰り返すことになるため、単調になり ... トを表示する例から見てみましょう。 ここでは、以下のようなモデルを使用します。 # models.py from django.db import models class Publisher ( models . Model ): name = models . CharField ( max_length = 30 ) address = models . CharField ( max_length = 50 ) city = ... s Book ( models . Model ): title = models . CharField ( max_length = 100 ) authors = models . ManyToManyField ( "Author" ) publisher = models . ForeignKey ( Publisher , on_delete = models . CASCADE ) publication_date = models . DateField () 次に、ビューを ... 定義しましょう。 # views.py from django.views.generic import ListView from books.models import Publisher class PublisherListView ( ListView ): model = Publisher 最後に、このビューを URL にフックさせます。 # urls.py from django. ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-display.html
組み込みのクラスベースのジェネリックビュー(汎用ビュー) — Django 6.1 ドキュメ... 12027
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 組み込みのクラスベースのジェネリックビュー(汎用ビュー) ¶ ウェブアプリケーションを書くのは、特定のパターンを何度も繰り返すことになるため、単調になり ... トを表示する例から見てみましょう。 ここでは、以下のようなモデルを使用します。 # models.py from django.db import models class Publisher ( models . Model ): name = models . CharField ( max_length = 30 ) address = models . CharField ( max_length = 50 ) city = ... s Book ( models . Model ): title = models . CharField ( max_length = 100 ) authors = models . ManyToManyField ( "Author" ) publisher = models . ForeignKey ( Publisher , on_delete = models . CASCADE ) publication_date = models . DateField () 次に、ビューを ... 定義しましょう。 # views.py from django.views.generic import ListView from books.models import Publisher class PublisherListView ( ListView ): model = Publisher 最後に、このビューを URL にフックさせます。 # urls.py from django. ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-display.html
アグリゲーション (集計) — Django 6.1 ドキュメント 10241
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » アグリゲーション (集計) ¶ Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明し ... odels class Author ( models . Model ): name = models . CharField ( max_length = 100 ) age = models . IntegerField () class Publisher ( models . Model ): name = models . CharField ( max_length = 300 ) class Book ( models . Model ): name = models . CharFiel ... eld ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatField () authors = models . ManyToManyField ( Author ) publisher = models . ForeignKey ( Publisher , on_delete = models . CASCADE ) pubdate = models . DateField () class Store ( models . ... な集計クエリは以下のようになります: # Total number of books. >>> Book . objects . count () 2452 # Total number of books with publisher=BaloneyPress >>> Book . objects . filter ( publisher__name = "BaloneyPress" ) . count () 73 # Average price across all boo ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
アグリゲーション (集計) — Django 6.1 ドキュメント 10241
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » アグリゲーション (集計) ¶ Djangoのデータベース抽象API のトピックガイドでは、個別のオブジェクトの作成、取得、削除を行うDjangoのクエリの使い方を説明し ... odels class Author ( models . Model ): name = models . CharField ( max_length = 100 ) age = models . IntegerField () class Publisher ( models . Model ): name = models . CharField ( max_length = 300 ) class Book ( models . Model ): name = models . CharFiel ... eld ( max_digits = 10 , decimal_places = 2 ) rating = models . FloatField () authors = models . ManyToManyField ( Author ) publisher = models . ForeignKey ( Publisher , on_delete = models . CASCADE ) pubdate = models . DateField () class Store ( models . ... な集計クエリは以下のようになります: # Total number of books. >>> Book . objects . count () 2452 # Total number of books with publisher=BaloneyPress >>> Book . objects . filter ( publisher__name = "BaloneyPress" ) . count () 73 # Average price across all boo ...
https://man.mtool.work/django/6.1/topics/db/aggregation.html
クラスベースのビューでミックスイン (mixin) を使用する — Django 6.1 ドキュメント 8667
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クラスベースのビューでミックスイン (mixin) を使用する ¶ 注意 This is an advanced topic. A working knowledge of Django's class-based views is advised ... には、2つの異なるクエリセットを用意する必要があります: ListView で使用するための Book の クエリセット リストアップしたい本の Publisher にアクセスできるので、 get_queryset() をオーバーライドして、 Publisher の 逆方向の外部キーマネージャ を使用します。 Publis ... her queryset for use in get_object() 正しい Publisher オブジェクトを取得するには、デフォルトの get_object() の実装に頼りましょう。ただし、明示的に queryset 引数を渡さなければな ... りません。なぜなら、デフォルトの get_object() の実装では get_queryset() を呼び出しますが、これは Publisher の代わりに Book オブジェクトを返すようにオーバーライドしているからです。 注釈 get_context_data() については慎重に考える必要 ...
https://man.mtool.work/django/6.1/topics/class-based-views/mixins.html
クラスベースのビューでミックスイン (mixin) を使用する — Django 6.1 ドキュメント 8543
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » クラスベースのビューでミックスイン (mixin) を使用する ¶ 注意 This is an advanced topic. A working knowledge of Django's class-based views is advised ... には、2つの異なるクエリセットを用意する必要があります: ListView で使用するための Book の クエリセット リストアップしたい本の Publisher にアクセスできるので、 get_queryset() をオーバーライドして、 Publisher の 逆方向の外部キーマネージャ を使用します。 Publis ... her queryset for use in get_object() 正しい Publisher オブジェクトを取得するには、デフォルトの get_object() の実装に頼りましょう。ただし、明示的に queryset 引数を渡さなければな ... りません。なぜなら、デフォルトの get_object() の実装では get_queryset() を呼び出しますが、これは Publisher の代わりに Book オブジェクトを返すようにオーバーライドしているからです。 注釈 get_context_data() については慎重に考える必要 ...
https://man.mtool.work/django/6.1/topics/class-based-views/mixins.html
複数のデータベース — Django 6.1 ドキュメント 7517
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 複数のデータベース ¶ ここでは、Djangoがサポートする複数データベースの扱いについて説明します。残りのDjangoのドキュメントの大部分は、あなたが一つのデー ... 書いたら、任意の Admin インスタンスに登録できます: from django.contrib import admin from myapp.models import Author , Book , Publisher # Import our custom ModelAdmin and TabularInline from where they're defined. from myproject.admin import MultiDBModelAdmin ... ize the multi-db admin objects for use with specific models. class BookInline ( MultiDBTabularInline ): model = Book class PublisherAdmin ( MultiDBModelAdmin ): inlines = [ BookInline ] admin . site . register ( Author , MultiDBModelAdmin ) admin . site . ... register ( Publisher , PublisherAdmin ) othersite = admin . AdminSite ( "othersite" ) othersite . register ( Publisher , MultiDBModelAdmin ) こ ...
https://man.mtool.work/django/6.1/topics/db/multi-db.html
複数のデータベース — Django 6.1 ドキュメント 7517
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 複数のデータベース ¶ ここでは、Djangoがサポートする複数データベースの扱いについて説明します。残りのDjangoのドキュメントの大部分は、あなたが一つのデー ... 書いたら、任意の Admin インスタンスに登録できます: from django.contrib import admin from myapp.models import Author , Book , Publisher # Import our custom ModelAdmin and TabularInline from where they're defined. from myproject.admin import MultiDBModelAdmin ... ize the multi-db admin objects for use with specific models. class BookInline ( MultiDBTabularInline ): model = Book class PublisherAdmin ( MultiDBModelAdmin ): inlines = [ BookInline ] admin . site . register ( Author , MultiDBModelAdmin ) admin . site . ... register ( Publisher , PublisherAdmin ) othersite = admin . AdminSite ( "othersite" ) othersite . register ( Publisher , MultiDBModelAdmin ) こ ...
https://man.mtool.work/django/6.1/topics/db/multi-db.html
URL ディスパッチャ — Django 6.1 ドキュメント 7481
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » URL ディスパッチャ ¶ すっきりした、簡潔で明解な URL スキームは、高品質な Web アプリケーションでは重要な要素です。 Django では、フレームワークの制限な ... rom the tutorial in two different locations so we can serve the same functionality to two different audiences (authors and publishers). URL の名前空間は 2 つの部分に分かれ、両方とも文字列で表されます: アプリケーションの名前空間 ¶ デプロイされているアプリケ ... ュートリアルで扱った polls アプリケーションの 2 つのインスタンスの例を考えてみましょう: 1 つは 'author-polls' 、もう 1 つは 'publisher-polls' と名付けられています。polls を作成して表示するときにインスタンス名前空間を考慮するように、そのアプリケーションを拡張 ... rt include , path urlpatterns = [ path ( "author-polls/" , include ( "polls.urls" , namespace = "author-polls" )), path ( "publisher-polls/" , include ( "polls.urls" , namespace = "publisher-polls" )), ] polls/urls.py ¶ from django.urls import path from . ...
https://man.mtool.work/django/6.1/topics/http/urls.html
URL ディスパッチャ — Django 6.1 ドキュメント 7481
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » URL ディスパッチャ ¶ すっきりした、簡潔で明解な URL スキームは、高品質な Web アプリケーションでは重要な要素です。 Django では、フレームワークの制限な ... rom the tutorial in two different locations so we can serve the same functionality to two different audiences (authors and publishers). URL の名前空間は 2 つの部分に分かれ、両方とも文字列で表されます: アプリケーションの名前空間 ¶ デプロイされているアプリケ ... ュートリアルで扱った polls アプリケーションの 2 つのインスタンスの例を考えてみましょう: 1 つは 'author-polls' 、もう 1 つは 'publisher-polls' と名付けられています。polls を作成して表示するときにインスタンス名前空間を考慮するように、そのアプリケーションを拡張 ... rt include , path urlpatterns = [ path ( "author-polls/" , include ( "polls.urls" , namespace = "author-polls" )), path ( "publisher-polls/" , include ( "polls.urls" , namespace = "publisher-polls" )), ] polls/urls.py ¶ from django.urls import path from . ...
https://man.mtool.work/django/6.1/topics/http/urls.html
PREV 1 2 NEXT