Browse Source

[minor] fix install of new app

version-14
Pratik Vyas 12 years ago
parent
commit
a3d9121c4e
4 changed files with 15 additions and 10 deletions
  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 View File

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

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


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


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

+ 2
- 4
webnotes/install_lib/setup_public_folder.py View File

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


for link in symlinks: 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.symlink(link[1], link[0])


os.chdir("..")

os.chdir('..')

+ 3
- 1
webnotes/translate.py View File

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


+ 5
- 2
webnotes/webutils.py View File

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


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


@@ -145,7 +144,11 @@ def prepare_args(page_name):
if not args: if not args:
return False 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 return args




Loading…
Cancel
Save