0
我使用基於類的視圖,我需要從不同視圖繼承兩個form_valids,例如。Django,如何處理多個Form_Valid
Class A(FormView)
def form_valid()
Does some stuff
return super().form_valid
Class B(FormView)
def form_valid()
Does some more stuff
return super().form_valid
Class C(Class A, Class B):
def form_valid()
takes form A and B stuff and does some more stuff
return super().form_valid
我的C類只從第一form_valid繼承和,因爲這是一個大項目,我試圖避免修補我我繼承能夠只是做形式的東西在課堂上的意見C.
歡迎所有建議