Exemplo n.º 1
0
def latest(verbose=True):
	import webnotes.modules.patch_handler
	import webnotes.model.sync
	from webnotes.website import rebuild_config
	
	webnotes.connect()
	
	try:
		# run patches
		webnotes.local.patch_log_list = []
		webnotes.modules.patch_handler.run_all()
		if verbose:
			print "\n".join(webnotes.local.patch_log_list)
	
		# sync
		webnotes.model.sync.sync_all()
				
		# build website config if any changes in templates etc.
		rebuild_config()
		
	except webnotes.modules.patch_handler.PatchError, e:
		print "\n".join(webnotes.local.patch_log_list)
		raise
Exemplo n.º 2
0
def build_sitemap():
	from webnotes.website import rebuild_config
	webnotes.connect()
	rebuild_config()
	webnotes.destroy()