Merge branch 'master' into dev
This commit is contained in:
commit
158e7751a8
@ -41,7 +41,7 @@ def cleanup():
|
|||||||
try:
|
try:
|
||||||
webnotes.model.delete_doc('Page', page)
|
webnotes.model.delete_doc('Page', page)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
webnotes.modules.patch_handler.log(str(e))
|
webnotes.modules.patch_handler.log(unicode(e))
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import conf
|
import conf
|
||||||
@ -74,7 +74,7 @@ def save_pages():
|
|||||||
try:
|
try:
|
||||||
DocList(dt, result['name'].encode('utf-8')).save()
|
DocList(dt, result['name'].encode('utf-8')).save()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
webnotes.modules.patch_handler.log(str(e))
|
webnotes.modules.patch_handler.log(unicode(e))
|
||||||
|
|
||||||
def save_website_settings():
|
def save_website_settings():
|
||||||
from webnotes.model.code import get_obj
|
from webnotes.model.code import get_obj
|
||||||
|
@ -225,6 +225,8 @@ def refresh_cache(build=None):
|
|||||||
|
|
||||||
# webnotes.conn.sql("delete from `tabWeb Cache`")
|
# webnotes.conn.sql("delete from `tabWeb Cache`")
|
||||||
|
|
||||||
|
clear_cache(None)
|
||||||
|
|
||||||
query_map = {
|
query_map = {
|
||||||
'Web Page': """select page_name, name from `tabWeb Page` where docstatus=0""",
|
'Web Page': """select page_name, name from `tabWeb Page` where docstatus=0""",
|
||||||
'Blog': """\
|
'Blog': """\
|
||||||
@ -236,12 +238,11 @@ def refresh_cache(build=None):
|
|||||||
}
|
}
|
||||||
|
|
||||||
for dt in query_map:
|
for dt in query_map:
|
||||||
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
|
if build and dt in build:
|
||||||
create_cache(result['page_name'], dt, result['name'])
|
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
|
||||||
clear_cache(result['page_name'], dt, result['name'])
|
create_cache(result['page_name'], dt, result['name'])
|
||||||
if build and dt in build: load_into_cache(result['page_name'])
|
load_into_cache(result['page_name'])
|
||||||
|
|
||||||
for page_name in get_predefined_pages():
|
for page_name in get_predefined_pages():
|
||||||
create_cache(page_name, None, None)
|
create_cache(page_name, None, None)
|
||||||
clear_cache(page_name, None, None)
|
|
||||||
if build: load_into_cache(page_name)
|
if build: load_into_cache(page_name)
|
Loading…
Reference in New Issue
Block a user