How does "Has Web View" in Doctypes work?

Hi All,

I was trying the new Has web View feature in erpnext 8. But I got the following message.

When I tried adding a new data field , it shows a listing as follows in the specified route.

How does it work actually?

ok I could add a Route field to a Project DocType then save it.

But when I switched to View Desktop then click on a menu Contact got this

Here’s the traceback:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 32, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 101, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 117, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 124, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 137, in build_page
context = get_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 15, in get_context
context = get_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 35, in get_page_context
page_context = make_page_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 44, in make_page_context
context = resolve_route(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 21, in resolve_route
return get_page_context_from_doctype(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 76, in get_page_context_from_doctype
page_info = get_page_info_from_doctypes(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/router.py”, line 99, in get_page_info_from_doctypes
condition_field = meta.is_published_field or controller.website.condition_field
AttributeError: type object ‘Project’ has no attribute ‘website’

Same thing here. Have you found a solution for that?

line 99, in get_page_info_from_doctypes
condition_field = meta.is_published_field or controller.website.condition_field

Check this out https://frappe.io/docs/user/en/guides/portal-development/generators