コード例 #1
0
ファイル: web_page.py プロジェクト: fogueri/frappe
    def on_update(self):
        WebsiteGenerator.on_update(self)

        # clear all cache if it has toc
        if self.doclist.get({"parentfield": "toc"}):
            from frappe.website.render import clear_cache
            clear_cache()
コード例 #2
0
ファイル: item_group.py プロジェクト: MofeLee/erpnext
	def set_parent_website_route(self):
		"""Overwrite `parent_website_route` from `WebsiteGenerator`.
			Only set `parent_website_route` if parent is visble.

			e.g. If `show_in_website` is set for Products then url should be `/products`"""
		if self.parent_item_group and frappe.db.get_value("Item Group", self.parent_item_group, "show_in_website"):
			WebsiteGenerator.set_parent_website_route(self)
		else:
			self.parent_website_route = ""
コード例 #3
0
	def set_parent_website_route(self):
		"""Overwrite `parent_website_route` from `WebsiteGenerator`.
			Only set `parent_website_route` if parent is visble.

			e.g. If `show_in_website` is set for Products then url should be `/products`"""
		if self.parent_item_group and frappe.db.get_value("Item Group", self.parent_item_group, "show_in_website"):
			WebsiteGenerator.set_parent_website_route(self)
		else:
			self.parent_website_route = ""
コード例 #4
0
ファイル: web_page.py プロジェクト: fogueri/frappe
    def on_trash(self):
        # delete entry from Table of Contents of other pages
        WebsiteGenerator.on_trash(self)

        frappe.db.sql(
            """delete from `tabTable of Contents`
			where web_page=%s""", self.doc.name)

        # clear all cache if it has toc
        if self.doclist.get({"parentfield": "toc"}):
            from frappe.website.render import clear_cache
            clear_cache()
コード例 #5
0
ファイル: item_group.py プロジェクト: yered1/erpnext
 def on_trash(self):
     NestedSet.on_trash(self)
     WebsiteGenerator.on_trash(self)
コード例 #6
0
ファイル: item_group.py プロジェクト: maticaZA/foundation
 def after_rename(self, olddn, newdn, merge=False):
     NestedSet.after_rename(self, olddn, newdn, merge)
     WebsiteGenerator.after_rename(self, olddn, newdn, merge)
コード例 #7
0
ファイル: item_group.py プロジェクト: maticaZA/foundation
 def on_update(self):
     NestedSet.on_update(self)
     WebsiteGenerator.on_update(self)
     invalidate_cache_for(self)
     self.validate_name_with_item()
     self.validate_one_root()
コード例 #8
0
 def on_update(self):
     WebsiteGenerator.on_update(self)
     clear_cache("writers")
コード例 #9
0
ファイル: blog_post.py プロジェクト: AhmedHamedTN/frappe
	def on_update(self):
		WebsiteGenerator.on_update(self)
		clear_cache("writers")
コード例 #10
0
ファイル: item_group.py プロジェクト: racitup/erpnext
	def on_trash(self):
		NestedSet.on_trash(self)
		WebsiteGenerator.on_trash(self)
		self.delete_child_item_groups_key()
コード例 #11
0
ファイル: item_group.py プロジェクト: Aravinthu/erpnext
	def on_trash(self):
		NestedSet.on_trash(self)
		WebsiteGenerator.on_trash(self)
コード例 #12
0
ファイル: item_group.py プロジェクト: Aravinthu/erpnext
	def on_update(self):
		NestedSet.on_update(self)
		WebsiteGenerator.on_update(self)
		invalidate_cache_for(self)
		self.validate_name_with_item()
		self.validate_one_root()
コード例 #13
0
ファイル: item_group.py プロジェクト: MofeLee/erpnext
	def after_rename(self, olddn, newdn, merge=False):
		NestedSet.after_rename(self, olddn, newdn, merge)
		WebsiteGenerator.after_rename(self, olddn, newdn, merge)
コード例 #14
0
 def on_update(self):
     WebsiteGenerator.on_update(self)
     NestedSet.on_update(self)
     clear_cache(website_group=self.name)
コード例 #15
0
def scrub(text):
    return WebsiteGenerator.scrub(None, text)
コード例 #16
0
ファイル: website_group.py プロジェクト: BitMistDev/frappe
 def on_update(self):
     WebsiteGenerator.on_update(self)
     clear_cache(website_group=self.name)