Browse Source

[minor] [website] [fix] table of contents recursion

version-14
Anand Doshi 11 years ago
parent
commit
77b9bc5bfe
2 changed files with 3 additions and 6 deletions
  1. +1
    -2
      webnotes/webutils.py
  2. +2
    -4
      website/doctype/web_page/web_page.py

+ 1
- 2
webnotes/webutils.py View File

@@ -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]


+ 2
- 4
website/doctype/web_page/web_page.py View File

@@ -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)


Loading…
Cancel
Save