I want to set a homepage for user not signed in

So I have created a new page titled “Home” and route “home” and adjusted the website setting on the homepage to point to “home”, That is when am getting the error.

When I leave the homepage route blank, it gives me the default login page, which I don’t want to be the case

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 521, in cache_html_decorator
    html = func(*args, **kwargs)
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 50, in get_html
  File "apps/frappe/frappe/website/page_renderers/document_page.py", line 65, in update_context
    ret = self.doc.get_context(self.context)
  File "apps/frappe/frappe/website/doctype/web_page/web_page.py", line 113, in get_context
  File "apps/frappe/frappe/website/doctype/web_page/web_page.py", line 174, in set_page_blocks
    out = get_web_blocks_html(self.page_blocks)
  File "apps/frappe/frappe/website/doctype/web_page/web_page.py", line 245, in get_web_blocks_html
    web_template = frappe.get_cached_doc("Web Template", block.web_template)
  File "apps/frappe/frappe/__init__.py", line 1247, in get_cached_doc
    doc = get_doc(*args, **kwargs)
  File "apps/frappe/frappe/__init__.py", line 1373, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 87, in get_doc
    return controller(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 128, in __init__
  File "apps/frappe/frappe/model/document.py", line 174, in load_from_db
  File "apps/frappe/frappe/__init__.py", line 681, in throw
  File "apps/frappe/frappe/__init__.py", line 646, in msgprint
  File "apps/frappe/frappe/__init__.py", line 597, in _raise_exception
    raise exc
frappe.exceptions.DoesNotExistError: Web Template None not found

Have you seen this post? It’s not exactly the same error but similar.
Can you visit the page without error while logged in (domain.com/home)?

Thank you for the feedback.

However, I resolved the issue with the instructions in this documentation.


In simpler terms, the steps are:

  1. Create a new web page and add the other contents/ sections.
  2. Note what you indicated as your route on the new web page and go to “website settings”
  3. Under home> landing page> home page> Paste the same value here.
  4. In short, the New page route’s value should be equal to the home page route’s value
1 Like