diff --git a/webnotes/webutils.py b/webnotes/webutils.py index 4a78361573..a6ab8590c4 100644 --- a/webnotes/webutils.py +++ b/webnotes/webutils.py @@ -213,8 +213,7 @@ def is_signup_enabled(): return webnotes.local.is_signup_enabled -from webnotes.model.controller import DocListController -class WebsiteGenerator(DocListController): +class WebsiteGenerator(object): def setup_generator(self): self._website_config = webnotes.conn.get_values("Website Sitemap Config", {"ref_doctype": self.doc.doctype}, "*")[0] diff --git a/website/doctype/web_page/web_page.py b/website/doctype/web_page/web_page.py index d8be7b5599..864ca9490c 100644 --- a/website/doctype/web_page/web_page.py +++ b/website/doctype/web_page/web_page.py @@ -5,11 +5,9 @@ from __future__ import unicode_literals import webnotes from webnotes.webutils import WebsiteGenerator from webnotes import _ +from webnotes.model.controller import DocListController -class DocType(WebsiteGenerator): - def __init__(self, d, dl): - self.doc, self.doclist = d, dl - +class DocType(DocListController, WebsiteGenerator): def autoname(self): from webnotes.webutils import cleanup_page_name self.doc.name = cleanup_page_name(self.doc.title)