2020
09-25
09-25
Xadmin+rules实现多选行权限方式(级联效果)
行权限配置xadmin中配置且不需要数据库支持,安装并配置rulespip安装:pipinstallrules配置settings.py#settings.pyINSTALLED_APPS=(#...'rules',)AUTHENTICATION_BACKENDS=('rules.permissions.ObjectPermissionBackend','django.contrib.auth.backends.ModelBackend',)配置models.py#models.pyclassCompanyUser(models.Model):users=models.OneToOneField(User,verbose_name='用户名',on_delete=User)is...
继续阅读 >