Browse Source

[documentation tool] [fix] import importlib within fns

version-14
Anand Doshi 12 years ago
parent
commit
dd034befae
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      core/doctype/documentation_tool/documentation_tool.py

+ 4
- 1
core/doctype/documentation_tool/documentation_tool.py View File

@@ -3,7 +3,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import webnotes import webnotes
import inspect, importlib, os, json, datetime
import inspect, os, json, datetime
from jinja2 import Template from jinja2 import Template
from webnotes.modules import get_doc_path, get_module_path, scrub from webnotes.modules import get_doc_path, get_module_path, scrub


@@ -50,6 +50,7 @@ def get_static_pages():


def get_docs_for(docs, name): def get_docs_for(docs, name):
"""build docs for python module""" """build docs for python module"""
import importlib
classname = "" classname = ""
parts = name.split(".") parts = name.split(".")


@@ -130,6 +131,7 @@ def get_gh_url(path):
return url return url


def get_modules(for_module=None): def get_modules(for_module=None):
import importlib
docs = { docs = {
"_label": "Modules" "_label": "Modules"
} }
@@ -193,6 +195,7 @@ def get_modules(for_module=None):
return docs return docs


def get_pages(m): def get_pages(m):
import importlib
pages = webnotes.conn.sql_list("""select name from tabPage where module=%s""", m) pages = webnotes.conn.sql_list("""select name from tabPage where module=%s""", m)
prefix = "docs.dev.modules." + m + ".page." prefix = "docs.dev.modules." + m + ".page."
docs = { docs = {


Loading…
Cancel
Save