Как объединить представления базы классов в одно представление базы классов?

У меня есть несколько базовых представлений классов. И я хочу объединить их в одно базовое представление класса:

class ReadingFile(View):
    def get(self, request):
        form = ProfileForm()
        return render(request, "main/controle_punt140.html", {
            "form": form
        })

    def post(self, request):
        pass

class ReadingExcel(View):

    def get(self, request):
        form = ExcelForm()
        return render(request, "main/controle_punt140.html", {
            "form": form
        })

    def post(self, request):
        pass
       

и затем я хочу объединить два вышеуказанных класса в этот класс:

class readingPDFAndExcelForm:
    reading_file = ReadingFile()
    reading_file.get()
    reading_file.post

    reading_excel = ReadingExcel()
    reading_file.get()
    reading_excel()

Или есть другое решение?

Вернуться на верх