per page, with , order by , clip by
Results of 1 - 10 of about 106 for title (0.006 sec.)
フォームセット (Formset) — Django 6.1 ドキュメント 12779
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームセット (Formset) ¶ class BaseFormSet [ソース] ¶ フォームセットは、同じページで複数のフォームを扱うための抽象レイヤーです。データグリッドに例 ... すいでしょう。次のようなフォームがあるとしましょう: >>> from django import forms >>> class ArticleForm ( forms . Form ): ... title = forms . CharField () ... pub_date = forms . DateField () ... ユーザーが一度に複数の記事を作成できるようにしたいと思うかも ... に表示できます: >>> formset = ArticleFormSet () >>> for form in formset : ... print ( form ) ... <div><label for="id_form-0-title">Title:</label><input type="text" name="form-0-title" id="id_form-0-title"></div> <div><label for="id_form-0-pub_date">Pub ... >>> ArticleFormSet = formset_factory ( ArticleForm , extra = 2 ) >>> formset = ArticleFormSet ( ... initial = [ ... { ... "title" : "Django is now open source" , ... "pub_date" : datetime . date . today (), ... } ... ] ... ) >>> for form in formset : ...
https://man.mtool.work/django/6.1/topics/forms/formsets.html
フォームセット (Formset) — Django 6.1 ドキュメント 12728
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » フォームセット (Formset) ¶ class BaseFormSet [ソース] ¶ フォームセットは、同じページで複数のフォームを扱うための抽象レイヤーです。データグリッドに例 ... すいでしょう。次のようなフォームがあるとしましょう: >>> from django import forms >>> class ArticleForm ( forms . Form ): ... title = forms . CharField () ... pub_date = forms . DateField () ... ユーザーが一度に複数の記事を作成できるようにしたいと思うかも ... に表示できます: >>> formset = ArticleFormSet () >>> for form in formset : ... print ( form ) ... <div><label for="id_form-0-title">Title:</label><input type="text" name="form-0-title" id="id_form-0-title"></div> <div><label for="id_form-0-pub_date">Pub ... >>> ArticleFormSet = formset_factory ( ArticleForm , extra = 2 ) >>> formset = ArticleFormSet ( ... initial = [ ... { ... "title" : "Django is now open source" , ... "pub_date" : datetime . date . today (), ... } ... ] ... ) >>> for form in formset : ...
https://man.mtool.work/django/6.1/topics/forms/formsets.html
配信 (syndication) フィード フレームワーク — Django 6.1 ドキュメント 10177
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 配信 (syndication) フィード フレームワーク ¶ Django には、 RSS と Atom フィードを作成するための高レベルな配信 (syndication) フィード生成フレームワー ... views import Feed from django.urls import reverse from policebeat.models import NewsItem class LatestEntriesFeed ( Feed ): title = "Police beat site news" link = "/sitenews/" description = "Updates on changes and additions to police beat central." def ... items ( self ): return NewsItem . objects . order_by ( "-pub_date" )[: 5 ] def item_title ( self , item ): return item . title def item_description ( self , item ): return item . description # item_link is only n ... latest/feed/" , LatestEntriesFeed ()), # ... ] 備考: Feedクラスは django.contrib.syndication.views.Feed のサブクラスです。 title 、 link 、および description は、それぞれ標準RSSの <title> , <link> , <description> 要素に対応します。 items() は、フィード ...
https://man.mtool.work/django/6.1/ref/contrib/syndication.html
配信 (syndication) フィード フレームワーク — Django 6.1 ドキュメント 10177
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 配信 (syndication) フィード フレームワーク ¶ Django には、 RSS と Atom フィードを作成するための高レベルな配信 (syndication) フィード生成フレームワー ... views import Feed from django.urls import reverse from policebeat.models import NewsItem class LatestEntriesFeed ( Feed ): title = "Police beat site news" link = "/sitenews/" description = "Updates on changes and additions to police beat central." def ... items ( self ): return NewsItem . objects . order_by ( "-pub_date" )[: 5 ] def item_title ( self , item ): return item . title def item_description ( self , item ): return item . description # item_link is only n ... latest/feed/" , LatestEntriesFeed ()), # ... ] 備考: Feedクラスは django.contrib.syndication.views.Feed のサブクラスです。 title 、 link 、および description は、それぞれ標準RSSの <title> , <link> , <description> 要素に対応します。 items() は、フィード ...
https://man.mtool.work/django/6.1/ref/contrib/syndication.html
多対多 (many-to-many) 関係 — Django 6.1 ドキュメント 8805
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対多 (many-to-many) 関係 ¶ 多対多の関係を定義するには、 ManyToManyField を使用します。 この例では、一つの Article は複数の Publication オブジェクト ... つの Publication は複数の Article オブジェクトを持ちます: from django.db import models class Publication ( models . Model ): title = models . CharField ( max_length = 30 ) class Meta : ordering = [ "title" ] def __str__ ( self ): return self . title cla ... 以下は、Python API の機能を使って実行できる操作の例です。 Publication インスタンスをいくつか作ります: >>> p1 = Publication ( title = "The Python Journal" ) >>> p1 . save () >>> p2 = Publication ( title = "Science News" ) >>> p2 . save () >>> p3 = Public ... ation ( title = "Science Weekly" ) >>> p3 . save () Article を一つ作ります: >>> a1 = Article ( headline = "Django lets you build web app ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_many.html
多対多 (many-to-many) 関係 — Django 6.1 ドキュメント 8754
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » 多対多 (many-to-many) 関係 ¶ 多対多の関係を定義するには、 ManyToManyField を使用します。 この例では、一つの Article は複数の Publication オブジェクト ... つの Publication は複数の Article オブジェクトを持ちます: from django.db import models class Publication ( models . Model ): title = models . CharField ( max_length = 30 ) class Meta : ordering = [ "title" ] def __str__ ( self ): return self . title cla ... 以下は、Python API の機能を使って実行できる操作の例です。 Publication インスタンスをいくつか作ります: >>> p1 = Publication ( title = "The Python Journal" ) >>> p1 . save () >>> p2 = Publication ( title = "Science News" ) >>> p2 . save () >>> p3 = Public ... ation ( title = "Science Weekly" ) >>> p3 . save () Article を一つ作ります: >>> a1 = Article ( headline = "Django lets you build web app ...
https://man.mtool.work/django/6.1/topics/db/examples/many_to_many.html
モデルからフォームを作成する — Django 6.1 ドキュメント 8511
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルからフォームを作成する ¶ ModelForm ¶ class ModelForm [ソース] ¶ データベース中心のアプリケーションを作成している場合、Django モデルに密接にマッ ... 完全な具体例 ¶ 以下のような一連のモデルを考えていきましょう: from django.db import models from django.forms import ModelForm TITLE_CHOICES = { "MR" : "Mr." , "MRS" : "Mrs." , "MS" : "Ms." , } class Author ( models . Model ): name = models . CharField ( ... max_length = 100 ) title = models . CharField ( max_length = 3 , choices = TITLE_CHOICES ) birth_date = models . DateField ( blank = True , null = ... ors = models . ManyToManyField ( Author ) class AuthorForm ( ModelForm ): class Meta : model = Author fields = [ "name" , "title" , "birth_date" ] class BookForm ( ModelForm ): class Meta : model = Book fields = [ "name" , "authors" ] これらのモデルで ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
モデルからフォームを作成する — Django 6.1 ドキュメント 8511
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » モデルからフォームを作成する ¶ ModelForm ¶ class ModelForm [ソース] ¶ データベース中心のアプリケーションを作成している場合、Django モデルに密接にマッ ... 完全な具体例 ¶ 以下のような一連のモデルを考えていきましょう: from django.db import models from django.forms import ModelForm TITLE_CHOICES = { "MR" : "Mr." , "MRS" : "Mrs." , "MS" : "Ms." , } class Author ( models . Model ): name = models . CharField ( ... max_length = 100 ) title = models . CharField ( max_length = 3 , choices = TITLE_CHOICES ) birth_date = models . DateField ( blank = True , null = ... ors = models . ManyToManyField ( Author ) class AuthorForm ( ModelForm ): class Meta : model = Author fields = [ "name" , "title" , "birth_date" ] class BookForm ( ModelForm ): class Meta : model = Book fields = [ "name" , "authors" ] これらのモデルで ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
Django テンプレート言語 — Django 6.1 ドキュメント 8075
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django テンプレート言語 ¶ このドキュメントはDjangoテンプレートシステムの文法を説明しています。もしあなたがもっと技術者的な観点でどう動かすかやどう拡 ... を示した最小限のテンプレートです。各要素については、この文書の後半で説明します。 {% extends "base_generic.html" %} {% block title %}{{ section.title }}{% endblock %} {% block content %} < h1 > {{ section.title }} </ h1 > {% for story in story_list %} < ... されてしまいます。このような場合は、先にオブジェクトを通常の辞書に変換することを検討してください。 上記の例では、 {{ section.title }} は section オブジェクトの title 属性と置き換えられます。 存在しない変数を使用すると、テンプレートシステムは string_if_i ... いて、まず例を見てみましょう: <!DOCTYPE html> < html lang = "en" > < head > < link rel = "stylesheet" href = "style.css" > < title > {% block title %} My amazing site {% endblock %} </ title > </ head > < body > < div id = "sidebar" > {% block sidebar % ...
https://man.mtool.work/django/6.1/ref/templates/language.html
Django テンプレート言語 — Django 6.1 ドキュメント 8075
Django 6.1 ドキュメント Home | Table of contents | Index | Modules « previous | up | next » Django テンプレート言語 ¶ このドキュメントはDjangoテンプレートシステムの文法を説明しています。もしあなたがもっと技術者的な観点でどう動かすかやどう拡 ... を示した最小限のテンプレートです。各要素については、この文書の後半で説明します。 {% extends "base_generic.html" %} {% block title %}{{ section.title }}{% endblock %} {% block content %} < h1 > {{ section.title }} </ h1 > {% for story in story_list %} < ... されてしまいます。このような場合は、先にオブジェクトを通常の辞書に変換することを検討してください。 上記の例では、 {{ section.title }} は section オブジェクトの title 属性と置き換えられます。 存在しない変数を使用すると、テンプレートシステムは string_if_i ... いて、まず例を見てみましょう: <!DOCTYPE html> < html lang = "en" > < head > < link rel = "stylesheet" href = "style.css" > < title > {% block title %} My amazing site {% endblock %} </ title > </ head > < body > < div id = "sidebar" > {% block sidebar % ...
https://man.mtool.work/django/6.1/ref/templates/language.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT