Django Call Class based view from another class based view

前端 未结 2 1722
醉梦人生
醉梦人生 2021-02-03 23:16

i am trying to call a class based view and i am able to do it, but for some reason i am not getting the context of the new class that i am calling

class ShowApps         


        
2条回答
  •  别那么骄傲
    2021-02-03 23:43

    Instead of

    ShowAppsView.as_view()(self.request)
    

    I had to do this

    return ShowAppsView.as_view()(self.request)
    

提交回复
热议问题