After running the code , the second placeholder in the template stays empty
import tkinter as tk from tkinter import messagebox from docxtpl import DocxTemplate class BaseTemplate: def __init__(self, template_name, context): self.template_name = template_name self.context = context def render(self): doc = DocxTemplate(self.template_name) doc.render(self.context) return doc class Template1(BaseTemplate): def __init__(self, context): template_name = "template1.docx" super().__init__(template_name, context) class Template2(BaseTemplate): def __init__(self, context): template_name = "template2.docx" super().__init__(template_name, context) def render_document(): # Get user input from tkinter entry widgets title = entry_title.get() content = entry_content.get() # Define contexts for each template context1 = {"title": title, "content": content} context2 = {"title": title, "content": content} # Render documents using inheritance template1 = Template1(context1) r