• A view is a callable which takes a request and returns a response.
  • A view can be function (function-based view) or a class (class-based view).
  • Class-based views allow you to structure your views and reuse code by harnessing inheritance and mixins.
  • There are two ways to configure or set class attributes:
    • to subclass and to override attributes and method in the subclass, and
    • to configure class attributes as keyword arguments to the as_view() call in the URLconf.

相关文章:

  • 2021-08-13
  • 2021-11-13
  • 2021-09-03
  • 2021-10-13
  • 2022-01-14
  • 2021-10-30
  • 2021-12-09
  • 2021-04-02
猜你喜欢
  • 2021-06-12
  • 2022-12-23
  • 2021-10-14
  • 2021-10-17
  • 2021-05-31
  • 2021-11-25
  • 2022-12-23
相关资源
相似解决方案