无法导入'python_digest'包

时间:2016-07-28 04:40:30

标签: python django tastypie

这是我的api资源类。

api.py

class UserTypeResource( ModelResource):
    class Meta:
        queryset = UserType.objects.all()
        resource_name = 'user_types'
        authorization=MyAuthorization()
        authentication=DigestAuthentication()
        allowed_methods = ['get']
        include_resource_uri=False
        limit=0

当我打电话给api时,我收到了这个错误。

Request URL:    http://127.0.0.1:8001/api/v1/user_type
Django Version: 1.8
Exception Type: ImproperlyConfigured
Exception Value:The 'python_digest' package could not be imported. It is required for use with the 'DigestAuthentication' class.

我该如何纠正这个?

0 个答案:

没有答案