0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Django フォームからデータを取得編

Posted at

目次

1.HTTPリクエスト:GET
2.HTTPリクエスト:POST
3.DjangoでPOST(GET)を取得する方法

#1. HTTPリクエスト:GET

#2. HTTPリクエスト:POST

  • POSTポストデータにはリクエストボディとして埋め込まれる
  • 事実上無制限のデータを扱える。
  • URLとは別のリクエストボディにデータが含まれるため、ブックマークできない

#3. DjangoでPOST(GET)を取得する方法
Djangoのrequest(httpリクエストのこと)引数から

views.py
request.POST.get("key")

メモ
ラジオボタンからPOSTで値を得るとき、nameの内容がkey
html属性のvaluevalueになる?
->html属性のnamekey, valuevalueになる

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?