def on_trash(self): # delete entry from Table of Contents of other pages WebsiteGenerator.on_trash(self) frappe.db.sql( """delete from `tabTable of Contents` where web_page=%s""", self.doc.name) # clear all cache if it has toc if self.doclist.get({"parentfield": "toc"}): from frappe.website.render import clear_cache clear_cache()
def on_trash(self): NestedSet.on_trash(self) WebsiteGenerator.on_trash(self)
def on_trash(self): NestedSet.on_trash(self) WebsiteGenerator.on_trash(self) self.delete_child_item_groups_key()