我目前正在尝试从另一个基于类的通用视图中调用基于类的通用视图,但似乎无法正确执行。
我试过的方法:
result = CategoryTypes.as_view() # The same way you put it in the urlconf
print result
印刷:<function CategoryTypes at 0x92bd924>
CategoryTypes.as_view()(self.request)
# &
CategoryTypes().dispatch(self.request)
追溯:
ContentNotRenderedError at /crm/categories/company/
The response content must be rendered before it can be accessed.
result = CategoryTypes().__init__()
print result
印刷:None
我如何从另一个角度称呼它?我已经认真尝试了课堂上的所有方法以及我能想到的调用方式。