Merge branch 'master' of github.com:webnotes/wnframework

This commit is contained in:
Nabin Hait 2012-12-06 17:07:09 +05:30
commit ae3fc6f73e
5 changed files with 11 additions and 12 deletions

View file

@ -22,13 +22,13 @@ cgitb.enable()
# import libs
sys.path.append('..')
sys.path.append('../lib/py')
sys.path.append('../lib')
sys.path.append('../app')
import webnotes
import webnotes.auth
import conf
sys.path.append(conf.modules_path)
if __name__=='__main__':
# webnotes.http_request = webnotes.auth.HTTPRequest()

View file

@ -21,7 +21,8 @@ cgitb.enable()
# import libs
sys.path.append('..')
sys.path.append('../lib/py')
sys.path.append('../lib')
sys.path.append('../app')
import webnotes
import webnotes.auth

View file

@ -48,6 +48,9 @@ wn.form.formatters = {
});
return html;
},
SmallText: function(value) {
return wn.form.formatters.Text(value);
},
WorkflowState: function(value) {
workflow_state = wn.meta.get("Workflow State", value)[0];
if(workflow_state) {
@ -66,5 +69,5 @@ wn.form.formatters = {
}
wn.form.get_formatter = function(fieldtype) {
return wn.form.formatters[fieldtype] || wn.form.formatters.Data;
return wn.form.formatters[fieldtype.replace(/ /g, "")] || wn.form.formatters.Data;
}

View file

@ -306,7 +306,9 @@ def reload_doc(module, dt=None, dn=None):
import webnotes.modules
return webnotes.modules.reload_doc(module, dt, dn)
from webnotes.model.rename_doc import rename_doc
def rename_doc(doctype, old, new, is_doctype=0, debug=0):
from webnotes.model.rename_doc import rename_doc
rename_doc(doctype, old, new, is_doctype, debug)
def insert(doclist):
import webnotes.model

7
wnf.py
View file

@ -83,10 +83,6 @@ def rebuild():
# build js / css
from webnotes.utils import bundlejs
bundlejs.bundle(False)
# build cache
import website.web_cache
website.web_cache.refresh_cache(['Blog'])
def apply_latest_patches():
import webnotes.modules.patch_handler
@ -415,9 +411,6 @@ def run():
import webnotes.cms.make
webnotes.cms.make.make()
import website.web_cache
website.web_cache.refresh_cache(['Blog'])
elif options.clear_cache:
clear_cache()