浏览代码

[minor] fix install of new app

version-14
Pratik Vyas 12 年前
父节点
当前提交
a3d9121c4e
共有 4 个文件被更改,包括 15 次插入10 次删除
  1. +5
    -3
      webnotes/install_lib/install.py
  2. +2
    -4
      webnotes/install_lib/setup_public_folder.py
  3. +3
    -1
      webnotes/translate.py
  4. +5
    -2
      webnotes/webutils.py

+ 5
- 3
webnotes/install_lib/install.py 查看文件

@@ -77,13 +77,15 @@ class Installer:
return target
def install_app(self):
sync_for("lib", force=True, sync_everything=True)
self.import_core_docs()

try:
from startup import install
except ImportError, e:
print "No app install found"
return

sync_for("lib", force=True, sync_everything=True)
self.import_core_docs()
install.pre_import()
sync_for("app", force=True, sync_everything=True)

@@ -156,4 +158,4 @@ class Installer:
webnotes.conn.sql("""create table __Auth (
`user` VARCHAR(180) NOT NULL PRIMARY KEY,
`password` VARCHAR(180) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8""")
) ENGINE=InnoDB DEFAULT CHARSET=utf8""")

+ 2
- 4
webnotes/install_lib/setup_public_folder.py 查看文件

@@ -29,9 +29,7 @@ def make():
]

for link in symlinks:
if not os.path.exists(link[0]):
if not os.path.exists(link[0]) and os.path.exists(link[1]):
os.symlink(link[1], link[0])

os.chdir("..")

os.chdir('..')

+ 3
- 1
webnotes/translate.py 查看文件

@@ -56,12 +56,14 @@ def update_translations():
message_updated = False
status_file_path = "app/.wnf-lang-status"
if not os.path.exists(os.path.join('app', 'translations')):
return
if os.path.exists(status_file_path):
with open(status_file_path, "r") as langstatusfile:
langstatus = eval(langstatusfile.read())
for lang in languages:
filename = 'app/translations/'+lang+'.csv'
filename = os.path.join('app', 'translations', lang + '.csv')
if langstatus.get(lang, None)!=os.path.getmtime(filename):
print "Setting up lang files for " + lang + "..."
if not message_updated:


+ 5
- 2
webnotes/webutils.py 查看文件

@@ -5,7 +5,6 @@ from __future__ import unicode_literals

import os
import conf
from startup.webutils import *
import webnotes
import webnotes.utils

@@ -145,7 +144,11 @@ def prepare_args(page_name):
if not args:
return False
update_template_args(page_name, args)
try:
from startup.webutils import update_template_args
update_template_args(page_name, args)
except ImportError:
pass
return args



正在加载...
取消
保存