Django Rest Framework: 'function' object has no attribute 'as_view'

后端 未结 5 1051
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-30 01:34

I\'ve been trying for a while to get a ModelResource or a View working using the Django Rest Framework. I\'m following the examples but the code in the examples is not worki

5条回答
  •  一生所求
    2020-12-30 01:51

    Since this is the #1 hit on google for this error message and there's a more subtle and probably common cause for it than the OPs, I'm posting this comment here.

    This error can also be caused by using a standard view decorator on a class based view instead of on the __dispatch__ method within the view.

提交回复
热议问题