关于同一个视图里,不同用户组对同一个字段的不同控制
-
-
-
@阿巴阿巴 例如:要实现A用户组的成员对W字段只读,
1)) 在模型里增加一个计算字段E,如is_in_A 来判断当前登录用户是否属于A用户组。
2)在视图中增加此字段E
3)在字段W中增加一个attrs,实现当E字段为True时,Readonly=1 -
D digitalsatori 将这个主题标记为已解决,在
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login