def load_assets(self):
		from frappe.modules import get_module_path, scrub
		import os

		page_name = scrub(self.name)

		path = os.path.join(get_module_path(self.module), 'page', page_name)

		# script
		fpath = os.path.join(path, page_name + '.js')
		if os.path.exists(fpath):
			with open(fpath, 'r') as f:
				self.script = render_include(f.read())

		# css
		fpath = os.path.join(path, page_name + '.css')
		if os.path.exists(fpath):
			with open(fpath, 'r') as f:
				self.style = unicode(f.read(), "utf-8")

		# html as js template
		for fname in os.listdir(path):
			if fname.endswith(".html"):
				with open(os.path.join(path, fname), 'r') as f:
					template = unicode(f.read(), "utf-8")
					if "<!-- jinja -->" in template:
						context = frappe._dict({})
						try:
							out = frappe.get_attr("{app}.{module}.page.{page}.{page}.get_context".format(
								app = frappe.local.module_app[scrub(self.module)],
								module = scrub(self.module),
								page = page_name
							))(context)

							if out:
								context = out
						except (AttributeError, __HOLE__):
							pass

						template = frappe.render_template(template, context)
					self.script = html_to_js_template(fname, template) + self.script

		if frappe.lang != 'en':
			from frappe.translate import get_lang_js
			self.script += get_lang_js("page", self.name)

		for path in get_code_files_via_hooks("page_js", self.name):
			js = get_js(path)
			if js:
				self.script += "\n\n" + js
dataset/ETHPy150Open frappe/frappe/frappe/core/doctype/page/page.py/Page.load_assets