【发布时间】:2013-06-22 17:28:46
【问题描述】:
当我使用时
from django.conf import settings
在我的 DjangoRestFramework 视图中,
class UserList(ListCreateAPIView):
queryset = settings.AUTH_USER_MODEL.objects.all()
serializer_class = UserSerializer
我收到错误消息
AttributeError at /users/
'str' object has no attribute 'objects'
Request Method: GET
Request URL: http://localhost:9999/users/
Django Version: 1.5.1
Exception Type: AttributeError
Exception Value:
'str' object has no attribute 'objects'
【问题讨论】:
标签: django django-views django-rest-framework django-users