seitime-frappe/frappe/www/about.py
petnd 27a68aaf8b
feat: allow to disable standard pages (#33756)
* feat: allow to disable about and contact page

* feat: change redirect to /404
2025-10-08 11:18:55 +05:30

14 lines
328 B
Python

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
sitemap = 1
def get_context(context):
context.doc = frappe.get_cached_doc("About Us Settings")
if context.doc.is_disabled:
frappe.local.flags.redirect_location = "/404"
raise frappe.Redirect
return context