What is the opposite of @login_required decorator for Django views?

后端 未结 6 2066
耶瑟儿~
耶瑟儿~ 2020-12-29 09:37

If I want to make sure that a view is listed as having public access, is there a decorator equivalent to @public_access which would be the opposite of @login_required and ma

6条回答
  •  误落风尘
    2020-12-29 09:50

    "Login not required" is the default. If you want to annotate that a view should never be login-restricted then you should do so in the docstring.

提交回复
热议问题