[minor] fix install of new app

This commit is contained in:
Pratik Vyas 2013-09-03 17:35:31 +05:30
parent e2f1eef0c7
commit a3d9121c4e
4 changed files with 15 additions and 10 deletions

View file

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

View file

@ -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('..')

View file

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

View file

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