【发布时间】:2011-01-15 19:07:52
【问题描述】:
我尝试在 django.contrib.auth.User 和 django.contrib.auth.Group
的帮助下遵循代码for g in request.user.groups:
l.append(g.name)
但这失败了,我收到了以下错误:
TypeError at /
'ManyRelatedManager' object is not iterable
Request Method: GET
Request URL: http://localhost:8000/
Exception Type: TypeError
Exception Value:
'ManyRelatedManager' object is not iterable
Exception Location: C:\p4\projects\...\users.py in permission, line 55
感谢您的帮助!
【问题讨论】:
标签: python django django-admin