阅读背景:

如何在基于django类的视图上使用permission_required decorator

来源:互联网 

I'm having a bit of trouble understanding how the new CBVs work. My question is this, I need to require login in all the views, and in some of them, specific permissions. In function-based views I do that with @permission_required() and the login_required attribute in the view, but I don't know how to do this on the new views. Is there some section in the django docs explaining this? I didn't found anything. What is wrong in my code?I'm having a bit of trouble understanding how t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: