Esempio n. 1
0
def latest(verbose=True, rebuild_website_config=True):
	import frappe.modules.patch_handler
	import frappe.model.sync
	from frappe.website import rebuild_config
	from frappe.utils.fixtures import sync_fixtures
	import frappe.translate
	
	frappe.connect()
	
	try:
		# run patches
		frappe.local.patch_log_list = []
		frappe.modules.patch_handler.run_all()
		if verbose:
			print "\n".join(frappe.local.patch_log_list)
	
		# sync
		frappe.model.sync.sync_all()
				
		# build website config if any changes in templates etc.
		if rebuild_website_config:
			rebuild_config()
		
		sync_fixtures()
		
		frappe.translate.clear_cache()
		
	except frappe.modules.patch_handler.PatchError, e:
		print "\n".join(frappe.local.patch_log_list)
		raise
Esempio n. 2
0
def latest(rebuild_website_config=True, quiet=False):
	import frappe.modules.patch_handler
	import frappe.model.sync
	from frappe.website import rebuild_config
	from frappe.utils.fixtures import sync_fixtures
	import frappe.translate
	from frappe.website import statics

	verbose = not quiet

	frappe.connect()

	try:
		# run patches
		frappe.modules.patch_handler.run_all()
		# sync
		frappe.model.sync.sync_all(verbose=verbose)
		sync_fixtures()

		statics.sync().start()
		# build website config if any changes in templates etc.
		if rebuild_website_config:
			rebuild_config()


		frappe.translate.clear_cache()

	finally:
		frappe.destroy()
Esempio n. 3
0
def build_sitemap():
	from frappe.website import rebuild_config
	frappe.connect()
	rebuild_config()
	frappe.destroy()
Esempio n. 4
0
def build_sitemap():
	from frappe.website import rebuild_config
	frappe.connect()
	rebuild_config()
	frappe.destroy()