per page, with , order by , clip by
Results of 1 - 10 of about 159 for Form (0.006 sec.)
フォームセット (Formset) 11430
フォームセット (Formset) class BaseFormSet [ソース] フォームセットは、同じページで複数のフォームを扱うための抽象レイヤーです。データグリッドに例えるとわかりやすいでしょう。次のようなフォームがあるとしましょう: >>> from django import forms > ... >> class ArticleForm ( forms . Form ): ... title = forms . CharField () ... pub_date = forms . DateField () ... ユーザーが一度に複数の記事を作成 ... できるようにしたいと思うかもしれません。 ArticleForm からフォームセットを作るには、次のようにします: >>> from django.forms import formset_factory >>> ArticleFormSet = formset_ ... factory ( ArticleForm ) これで ArticleFormSet という名前のフォームセットクラスが作成されました。フォームセットをインスタンス化することで、フォー ...
https://man.mtool.work/django/6.1/topics/forms/formsets.html
フォーム API 10361
フォーム API このドキュメントについて このドキュメントでは、Django のフォーム API の詳細について説明します。このドキュメントを読む前に フォームについての概要 を読むことをおすすめします。 バインドされた (bound) フォームとバインドされていない ... (unbound) フォーム Form のインスタンスには、データセットに バインドされている (bound な) ものと バインドされていない (unbound な) ものがあります。 ... データセットに バインドされた Form インスタンスであれば、そのデータをバリデーションしたり、HTMLとしてフォームをレンダリングし、HTMLにデータを表示したりするこ ... とができます。 データセットに バインドされていない Form インスタンスでは、(検証するデータがないので)データをバリデーションすることはできませんが、空のフォームをHTMLとしてレンダ ...
https://man.mtool.work/django/6.1/ref/forms/api.html
フォームを使う 10165
フォームを使う このドキュメントについて このドキュメントでは、Web フォームの基本と、それらを Django で扱う方法を紹介しています。より詳しく知りたいときは、フォーム API の特定の領域、 フォーム API 、 フォーム フィールド または フォームとフィー ... 入れ、そのデータを処理したあと、入力に応じたレスポンスを返すことができるようになります。 HTML フォーム HTMLでは、フォームは <form>...</form> 内の要素の集まりで、訪問者によるテキスト入力、オプション選択、オブジェクトやコントロールの操作などを可能にし、こ ... jango が次の行動を決めるために使われる、ユーザーからは見えない隠しテキストフィールドもあります。 また、フォームのデータが <form> の action 属性によって指定された URL - /admin/ - に送信されるべきこと、そして method 属性によって指定されたHTTP メカニズム ... と値を含みます。実際に、Django ドキュメンテーションで何かを検索してみると、フォーム https://docs.djangoproject.com/search/?q=forms&release=1 といった URL が生成されるのが分かるでしょう。 GET と POST は、一般的には異なる目的に使われます。 システムの状態 ...
https://man.mtool.work/django/6.1/topics/forms/
モデルからフォームを作成する 9901
モデルからフォームを作成する ModelForm class ModelForm [ソース] データベース中心のアプリケーションを作成している場合、Django モデルに密接にマップするフォームを使うことになるでしょう。例えば、 BlogComment モデルを持っていて、閲覧者がコメント ... が定義されているので、フォーム内にフィールドタイプを改めて定義するのは冗長でしょう。 このためDjango には、Django モデルから Form クラスを生成できるようなヘルパークラスを用意してあります。 例えば次のようにします: >>> from django.forms import ModelForm ... >>> from myapp.models import Article # Create the form class. >>> class ArticleForm ( ModelForm ): ... class Meta : ... model = Article ... fields = [ "pub_date" , "headline" , ... "content" , "reporter" ] ... # Creating a form to add an article. >>> form = ArticleForm () # Creating a form to change an existing article. >>> article = Article . obje ...
https://man.mtool.work/django/6.1/topics/forms/modelforms.html
クラスベースのビューでフォームを扱う 9866
クラスベースのビューでフォームを扱う フォームの処理には、一般に3つの場合分けが存在します。 最初の GET リクエスト (空白またはデフォルト値が埋め込まれたフォームを返す) 無効なデータの POST リクエスト (よくあるパターンは、エラー表示を追加したフ ... ームを処理するための一般的なクラスビューを用意しています。 基本的なフォーム 以下のようなコンタクトフォームがあったとします。 forms.py from django import forms class ContactForm ( forms . Form ): name = forms . CharField () message = forms . CharField ( ... widget = forms . Textarea ) def send_email ( self ): # send email using the self.cleaned_data dictionary pass このとき、ビューは FormVie ... w を使うことで構築できます。 views.py from myapp.forms import ContactForm from django.views.generic.edit import FormView class ContactFormView ( FormView ): template_name = "co ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-editing.html
ジェネリック編集ビュー (Generic editing view) 9222
ジェネリック編集ビュー (Generic editing view) 以下のビューは、このページで説明され、内容を編集するための基礎を提供します: django.views.generic.edit.FormView django.views.generic.edit.CreateView django.views.generic.edit.UpdateView django.vi ... ield ( max_length = 200 ) def get_absolute_url ( self ): return reverse ( "author-detail" , kwargs = { "pk" : self . pk }) FormView class django.views.generic.edit. FormView フォームを描画するビューです。エラー時には、バリデーションエラーとともにフォ ... 下のビューからメソッドと属性を継承しています: django.views.generic.base.TemplateResponseMixin django.views.generic.edit.BaseFormView 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 . CharField ( widget = forms . Textarea ) ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-editing.html
ミックスイン (mixin) を編集する 9119
ミックスイン (mixin) を編集する 以下のミックスイン (mixin) は、Djangoの編集ビューを構築するのに使用されます。 django.views.generic.edit.FormMixin django.views.generic.edit.ModelFormMixin django.views.generic.edit.ProcessFormView django.view ... tionMixin 注釈 これらの編集ビューへの結合され方の例は、 ジェネリック編集ビュー (Generic editing view) を参照してください。 FormMixin class django.views.generic.edit. FormMixin フォームを作成したり表示したりする機能を提供するmixinクラス。 ミックスイン ... django.views.generic.base.ContextMixin メソッドと属性 initial フォームの初期化データのディクショナリ。 form_class インスタンス化するフォームクラス。 success_url フォームが正常に処理されたときにリダイレクトするURL。 prefix 生成され ... るフォームの prefix 。 get_initial () フォームの初期データを取得します。デフォルトでは、 initial のコピーを返します。 get_form_class () インスタンス化するフォームクラスを取得します。デフォルトでは form_class です。 get_form ( form_class = None ) get ...
https://man.mtool.work/django/6.1/ref/class-based-views/mixins-editing.html
Django 4.1 リリースノート 9061
Django 4.1 リリースノート 2022年8月3日 Django 4.1 へようこそ! このリリースノートでは、 バージョン 4.1 の新機能 と、Django 4.0 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... sponse from django.views import View class AsyncView ( View ): async def get ( self , request , * args , ** kwargs ): # Perform view logic using await. await asyncio . sleep ( 1 ) return HttpResponse ( "Hello async world!" ) 詳細は 非同期のクラスベー ... heck , unique , and exclusion constraints defined in the Meta.constraints option are now checked during model validation . Form rendering accessibility In order to aid users with screen readers, and other assistive technology, new <div> based form te ... roup related controls, such as radio-lists, into fieldsets. The new templates are recommended, and will become the default form rendering style when outputting a form, like {{ form }} in a template, from Django 5.0. In order to ease adopting the new ...
https://man.mtool.work/django/6.1/releases/4.1.html
ファイルのアップロード 8406
ファイルのアップロード Django がファイルアップロードを扱うとき、ファイルデータは request.FILES に格納されます ( request についての詳細は リクエスト/レスポンス オブジェクト を参照してください)。ここでは、ファイルがどのようにディスクとメモリに ... したコンテンツ のセキュリティガイドをご覧ください。 ファイルのアップロードの基本 FileField を持つフォームを考えてみましょう: forms.py from django import forms class UploadFileForm ( forms . Form ): title = forms . CharField ( max_length = 50 ) file = f ... 格納されるのは、リクエストメソッドが POST で、少なくとも1つのファイルフィールドが実際に投稿され、かつリクエストをポストした <form> の属性に enctype="multipart/form-data" が設定されていた場合に限られることに注意してください。そうでない場合には、 request ... 場合、下記のようになります: views.py from django.http import HttpResponseRedirect from django.shortcuts import render from .forms import UploadFileForm # Imaginary function to handle an uploaded file. from somewhere import handle_uploaded_file def upl ...
https://man.mtool.work/django/6.1/topics/http/file-uploads.html
Django 1.6 リリースノート 7762
Django 1.6 リリースノート 注釈 Dedicated to Malcolm Tredinnick On March 17, 2013, the Django project and the free software community lost a very dear friend and developer. Malcolm was a long-time contributor to Django, a model community mem ... ip enriched us. His consideration, patience, and dedication will always be an inspiration to us. This release of Django is for Malcolm. -- The Django Developers November 6, 2013 Django 1.6 へようこそ! These release notes cover the new features , as w ... Database-level autocommit is now turned on by default. This makes transaction handling more explicit and should improve performance. The existing APIs were deprecated, and new APIs were introduced, as described in the transaction management docs . Pe ... ethod_name pseudo-paths. This allows running tests located anywhere in your codebase, rather than only in INSTALLED_APPS . For more details, see Django におけるテスト . This change is backwards-incompatible; see the backwards-incompatibility notes . ...
https://man.mtool.work/django/6.1/releases/1.6.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT