瀏覽代碼

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

version-14
Anand Doshi 11 年之前
父節點
當前提交
77b9bc5bfe
共有 2 個檔案被更改,包括 3 行新增6 行删除
  1. +1
    -2
      webnotes/webutils.py
  2. +2
    -4
      website/doctype/web_page/web_page.py

+ 1
- 2
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]


+ 2
- 4
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)


Loading…
取消
儲存