Skip to content

Commit

Permalink
Merge pull request #73 from frappe/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
surajshetty3416 authored Feb 9, 2024
2 parents c7519ff + b4cbc08 commit ad0978e
Show file tree
Hide file tree
Showing 8 changed files with 285 additions and 4,920 deletions.
8 changes: 6 additions & 2 deletions builder/builder/doctype/builder_page/builder_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
import frappe
import frappe.utils
from builder.html_preview_image import generate_preview
from builder.utils import safer_exec
from frappe.utils.caching import redis_cache
from frappe.utils.jinja import render_template
from frappe.utils.safe_exec import safe_exec, is_safe_exec_enabled
from frappe.utils.safe_exec import is_safe_exec_enabled, safe_exec
from frappe.website.page_renderers.document_page import DocumentPage
from frappe.website.path_resolver import evaluate_dynamic_routes
from frappe.website.path_resolver import resolve_path as original_resolve_path
from frappe.website.serve import get_response_content
from frappe.website.utils import clear_cache
from frappe.website.website_generator import WebsiteGenerator
from jinja2.exceptions import TemplateSyntaxError
from werkzeug.routing import Rule
from builder.utils import safer_exec

MOBILE_BREAKPOINT = 576
TABLET_BREAKPOINT = 768
Expand Down Expand Up @@ -79,6 +80,9 @@ def on_update(self):
get_web_pages_with_dynamic_routes.clear_cache()
find_page_with_path.clear_cache()

if self.has_value_changed("published") and not self.published:
clear_cache(self.route)

def autoname(self):
if not self.name:
self.name = f"page-{frappe.generate_hash(length=5)}"
Expand Down
Loading

0 comments on commit ad0978e

Please sign in to comment.