django-tastypie: Cannot access bundle.request in dehydrate(self,bundle)

前端 未结 1 1618
滥情空心
滥情空心 2021-01-23 20:49

I found someone with the same problem, but the solation for him doesn\'t work with me: see Django-Tastypie: How Do You Access (Http)request object in the Bundle?

I Am tr

相关标签:
1条回答
  • 2021-01-23 21:06

    You're probably running Tastypie 9.10 if you installed from pypi. The Bundle object in the pypi version does indeed not have a request object.

    If you upgrade to the git version of django-tastypie master and use that instead the problem should be resolved.

    pip uninstall django-tastypie 
    pip install -e git+https://github.com/toastdriven/django-tastypie.git#egg=django-tastypie
    
    0 讨论(0)
提交回复
热议问题