permissions_list.py 489 B

1234567
  1. from utils.permissions_hook import view_my_own_cus_tomers
  2. # 字典里的键值是和users模型里面的,permissions参数的元组里面的元组的第一个下标
  3. # 字典值的第一个就是访问url的命名空间
  4. perm_dic = {
  5. 'contens_firstadvertisement_getlist': ['FirstAdvertisement', 'GET', [], {},view_my_own_cus_tomers ], # 查询广告分类
  6. 'users_UserTotalCountView_getlist': ['UserTotalCountView', 'GET', [], {},view_my_own_cus_tomers], # 统计用户总人数
  7. }