Try ERPNext Buy Support Partners Foundation

Context not working

I’m using a website generator to create pages for a doctype Programs, I need to get children data loaded through the context on the web form. But the context is not being loaded.

class Programs(WebsiteGenerator):
	website = frappe._dict(
		page_title_field="program_name",
		# condition_field="show_in_website",
		no_cache=1
	)
	def get_context(self, context):

		print("In Children context")
		context.no_cache = 1
		context.show_sidebar = True
		children = frappe.get_all('Children', fields=['first_name'])
		context.children = children

		return context