Using mixins with class-based views
Using mixins with class-based views
Caution
This is an advanced topic. A working knowledge of Django’s class-based views is advised before exploring these techniques.
Django’s built-in class-based views provide a lot of functionality, but some of it you may want to use separately. For instance, you may want to write a view that renders a template to make the HTTP response, but you can’t use TemplateView
; perhaps you need to render a template only on POST
, with GET登录查看完整内容