per page, with , order by , clip by
Results of 1 - 1 of about 1 for AboutView (0.001 sec.)
クラスベースビュー 9414
クラスベースビュー ビューとは、リクエストを受け取り、レスポンスを返す呼び出し可能オブジェクトです。ビューは単なる関数以上のものにもなり得ます。Django ではビューとして使用できるいくつかのクラスを提供しており、これらを利用することで、ビューを ... 化し、テンプレート名を上書きすることで実装できます。 # some_app/views.py from django.views.generic import TemplateView class AboutView ( TemplateView ): template_name = "about.html" あとは、URLconf にこの新しいビューを追加する必要があります。 TemplateView は ... クラスベースビューに対する関数ライクな要素を指定できます。 # urls.py from django.urls import path from some_app.views import AboutView urlpatterns = [ path ( "about/" , AboutView . as_view ()), ] 組み込みの汎用ビューの使用方法の詳細については、次のトピック ...
https://man.mtool.work/django/6.1/topics/class-based-views/
PREV 1 NEXT