Refactored plugin architecture to allow custom script reports

This commit is contained in:
Anand Doshi
2013-11-06 14:19:09 +05:30
parent 3bed5abc76
commit 8728f26442
3 changed files with 27 additions and 2 deletions

View File

@@ -106,8 +106,8 @@ def make_demo_login_page():
def make_demo_on_login_script():
import shutil
from core.doctype.custom_script.custom_script import get_custom_server_script_path
custom_script_path = get_custom_server_script_path("Control Panel")
import webnotes.plugins
custom_script_path = webnotes.plugins.get_path("Core", "DocType", "Control Panel")
webnotes.create_folder(os.path.dirname(custom_script_path))
shutil.copyfile(os.path.join(os.path.dirname(__file__), "demo_control_panel.py"), custom_script_path)