add和
remove方法:
from django.contrib.auth.models import Permission permission = Permission.objects.get(name='Can view poll') u.user_permissions.add(permission)
欢迎分享,转载请注明来源:内存溢出
add和
remove方法:
from django.contrib.auth.models import Permission permission = Permission.objects.get(name='Can view poll') u.user_permissions.add(permission)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)