per page, with , order by , clip by
Results of 1 - 10 of about 96 for myapp (0.003 sec.)
ジェネリック日付ビュー — Django 6.1 ドキュメント 12449
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ジェネリック日付ビュー ¶ 日付ベースのジェネリックビュー ( django.views.generic.dates 内で提供されています) は、日付ベースのデータのために、ドリルダウ ... ンページを描画するためのビューです。 注釈 このページの例のいくつかは、 myapp/models.py 内で下記の通り Article モデルが定義されていると仮定します: from django.db import models from django.urls import ... デフォルトですが、 date_list_period 属性を用いた月や日に変更できます。これは、すべてのサブクラスのビューに適用されます。 例 myapp/urls.py : from django.urls import path from django.views.generic.dates import ArchiveIndexView from myapp.models import Ar ... "archive/" , ArchiveIndexView . as_view ( model = Article , date_field = "pub_date" ), name = "article_archive" , ), ] 例 myapp/article_archive.html : < ul > {% for article in latest %} < li > {{ article.pub_date }} : {{ article.title }} </ li > {% e ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-date-based.html
ジェネリック日付ビュー — Django 6.1 ドキュメント 12384
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ジェネリック日付ビュー ¶ 日付ベースのジェネリックビュー ( django.views.generic.dates 内で提供されています) は、日付ベースのデータのために、ドリルダウ ... ンページを描画するためのビューです。 注釈 このページの例のいくつかは、 myapp/models.py 内で下記の通り Article モデルが定義されていると仮定します: from django.db import models from django.urls import ... デフォルトですが、 date_list_period 属性を用いた月や日に変更できます。これは、すべてのサブクラスのビューに適用されます。 例 myapp/urls.py : from django.urls import path from django.views.generic.dates import ArchiveIndexView from myapp.models import Ar ... "archive/" , ArchiveIndexView . as_view ( model = Article , date_field = "pub_date" ), name = "article_archive" , ), ] 例 myapp/article_archive.html : < ul > {% for article in latest %} < li > {{ article.pub_date }} : {{ article.title }} </ li > {% e ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-date-based.html
ジェネリック編集ビュー (Generic editing view) — Django 6.1 ドキュメント 10519
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ジェネリック編集ビュー (Generic editing view) ¶ 以下のビューは、このページで説明され、内容を編集するための基礎を提供します: django.views.generic.edi ... まれており、フォーム送信の成功に関するメッセージを表示できます。 注釈 このページの例のいくつかは、 Author モデルが下記の通り myapp/models.py 内で定義されているものと見なしています。 from django.db import models from django.urls import reverse class Auth ... seFormView django.views.generic.edit.FormMixin django.views.generic.edit.ProcessFormView django.views.generic.base.View 例 myapp/forms.py : from django import forms class ContactForm ( forms . Form ): name = forms . CharField () message = forms . Char ... Field ( widget = forms . Textarea ) def send_email ( self ): # send email using the self.cleaned_data dictionary pass 例 myapp/views.py : from myapp.forms import ContactForm from django.views.generic.edit import FormView class ContactFormView ( Form ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-editing.html
ジェネリック編集ビュー (Generic editing view) — Django 6.1 ドキュメント 10453
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » ジェネリック編集ビュー (Generic editing view) ¶ 以下のビューは、このページで説明され、内容を編集するための基礎を提供します: django.views.generic.edi ... まれており、フォーム送信の成功に関するメッセージを表示できます。 注釈 このページの例のいくつかは、 Author モデルが下記の通り myapp/models.py 内で定義されているものと見なしています。 from django.db import models from django.urls import reverse class Auth ... seFormView django.views.generic.edit.FormMixin django.views.generic.edit.ProcessFormView django.views.generic.base.View 例 myapp/forms.py : from django import forms class ContactForm ( forms . Form ): name = forms . CharField () message = forms . Char ... Field ( widget = forms . Textarea ) def send_email ( self ): # send email using the self.cleaned_data dictionary pass 例 myapp/views.py : from myapp.forms import ContactForm from django.views.generic.edit import FormView class ContactFormView ( Form ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-editing.html
Djangoの設定 — Django 6.1 ドキュメント 8772
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Djangoの設定 ¶ Djangoの設定ファイルには、インストールしたDjangoの全ての設定が含まれています。このドキュメントでは、各設定の役割と、どのような設定を利 ... gure() 呼び出し時の default_settings 引数(または最初の位置引数)として渡すことができます。 この例では、デフォルトの設定は myapp_defaults から取得され、 DEBUG 設定は myapp_defaults での値に関係なく True に設定されます: from django.conf import settings ... from myapp import myapp_defaults settings . configure ( default_settings = myapp_defaults , DEBUG = True ) 次の例では、 myapp_default ... s を位置引数として使っていますが、等価です: settings . configure ( myapp_defaults , DEBUG = True ) 通常、このような方法でデフォルトを上書きする必要はありません。Django のデフォ ルトは十分に無難な ...
https://man.mtool.work/django/6.1/topics/settings.html
Djangoの設定 — Django 6.1 ドキュメント 8706
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Djangoの設定 ¶ Djangoの設定ファイルには、インストールしたDjangoの全ての設定が含まれています。このドキュメントでは、各設定の役割と、どのような設定を利 ... gure() 呼び出し時の default_settings 引数(または最初の位置引数)として渡すことができます。 この例では、デフォルトの設定は myapp_defaults から取得され、 DEBUG 設定は myapp_defaults での値に関係なく True に設定されます: from django.conf import settings ... from myapp import myapp_defaults settings . configure ( default_settings = myapp_defaults , DEBUG = True ) 次の例では、 myapp_default ... s を位置引数として使っていますが、等価です: settings . configure ( myapp_defaults , DEBUG = True ) 通常、このような方法でデフォルトを上書きする必要はありません。Django のデフォ ルトは十分に無難な ...
https://man.mtool.work/django/6.1/topics/settings.html
素の SQL 文の実行 — Django 6.1 ドキュメント 8273
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 素の SQL 文の実行 ¶ Django gives you three ways of performing raw SQL queries: you can embed raw SQL fragments into ORM queries using RawSQL (see Ra ... . DateField ( ... ) このとき、以下のように独自の SQL を実行できます: >>> for p in Person . objects . raw ( "SELECT * FROM myapp_person" ): ... print ( p ) ... John Smith Jane Jones この例はたいしてエキサイティングではありません。これは Person.objects ... で使った名前) とモデルのクラス名をアンダースコアでつないで、データベースのテーブル名を決定します。たとえば、 Person モデルは myapp という名前のアプリの中にあると仮定しているので、そのテーブルは myapp_person となります。 詳細に関しては、手動でデータベース ... 以下のクエリはどちらも同じように動作します: >>> Person . objects . raw ( "SELECT id, first_name, last_name, birth_date FROM myapp_person" ) >>> Person . objects . raw ( "SELECT last_name, birth_date, first_name, id FROM myapp_person" ) マッチングは名前 ...
https://man.mtool.work/django/6.1/topics/db/sql.html
素の SQL 文の実行 — Django 6.1 ドキュメント 8273
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 素の SQL 文の実行 ¶ Django gives you three ways of performing raw SQL queries: you can embed raw SQL fragments into ORM queries using RawSQL (see Ra ... . DateField ( ... ) このとき、以下のように独自の SQL を実行できます: >>> for p in Person . objects . raw ( "SELECT * FROM myapp_person" ): ... print ( p ) ... John Smith Jane Jones この例はたいしてエキサイティングではありません。これは Person.objects ... で使った名前) とモデルのクラス名をアンダースコアでつないで、データベースのテーブル名を決定します。たとえば、 Person モデルは myapp という名前のアプリの中にあると仮定しているので、そのテーブルは myapp_person となります。 詳細に関しては、手動でデータベース ... 以下のクエリはどちらも同じように動作します: >>> Person . objects . raw ( "SELECT id, first_name, last_name, birth_date FROM myapp_person" ) >>> Person . objects . raw ( "SELECT last_name, birth_date, first_name, id FROM myapp_person" ) マッチングは名前 ...
https://man.mtool.work/django/6.1/topics/db/sql.html
データベースのマイグレーションの作成方法 — Django 6.1 ドキュメント 8024
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベースのマイグレーションの作成方法 ¶ このドキュメントでは、遭遇する可能性のあるいくつかのシナリオに対する、データベースのマイグレーションの構成 ... orwards ), ] You can also provide hints that will be passed to the allow_migrate() method of database routers as **hints : myapp/dbrouters.py ¶ class MyRouter : def allow_migrate ( self , db , app_label , model_name = None , ** hints ): if "target_db" ... s コマンドを実行します。これにより、 AddField 操作を含むマイグレーションが生成されます。 同じアプリに対して makemigrations myapp --empty を2回実行して、2つの空のマイグレーションファイルを生成します。以下の例では、マイグレーションファイルにわかりやすい ... H:MM from django.db import migrations , models import uuid class Migration ( migrations . Migration ): dependencies = [ ( "myapp" , "0005_populate_uuid_values" ), ] operations = [ migrations . AlterField ( model_name = "mymodel" , name = "uuid" , fiel ...
https://man.mtool.work/django/6.1/howto/writing-migrations.html
データベースのマイグレーションの作成方法 — Django 6.1 ドキュメント 7958
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » データベースのマイグレーションの作成方法 ¶ このドキュメントでは、遭遇する可能性のあるいくつかのシナリオに対する、データベースのマイグレーションの構成 ... orwards ), ] You can also provide hints that will be passed to the allow_migrate() method of database routers as **hints : myapp/dbrouters.py ¶ class MyRouter : def allow_migrate ( self , db , app_label , model_name = None , ** hints ): if "target_db" ... s コマンドを実行します。これにより、 AddField 操作を含むマイグレーションが生成されます。 同じアプリに対して makemigrations myapp --empty を2回実行して、2つの空のマイグレーションファイルを生成します。以下の例では、マイグレーションファイルにわかりやすい ... H:MM from django.db import migrations , models import uuid class Migration ( migrations . Migration ): dependencies = [ ( "myapp" , "0005_populate_uuid_values" ), ] operations = [ migrations . AlterField ( model_name = "mymodel" , name = "uuid" , fiel ...
https://man.mtool.work/django/6.1/howto/writing-migrations.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT