After Enable Web View - object has no attribute 'get_page_info'

I enabled Web View for Doctype Airplane Flight, added Is Published and Router field but below error is showing after clicking on any Airplane Flight from list.

Traceback (most recent call last):
  File "apps/frappe/frappe/website/serve.py", line 20, in get_response
    response = renderer_instance.render()
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 41, in render
    html = self.get_html()
  File "apps/frappe/frappe/website/utils.py", line 523, in cache_html_decorator
    html = func(*args, **kwargs)
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 50, in get_html
    self.update_context()
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 57, in update_context
    self.context.update(self.context.doc.get_page_info())
AttributeError: 'AirplaneFlight' object has no attribute 'get_page_info'

Suggestions and any hint is highly appreciated.

Hi,

The famous Hussain courses :wink:

From what class herit your Airplane Flight class ? Document I guess ?
Mau be you whould check in ERPNext or Frappe core code some website page to find existing exemple.

My hint, the solution is to change class heritage of your Airplane Flight Doctype

1 Like

Yes. Its #bwh course example.
I will check for existing pages example.