Пример #1
0
	def update_website(self):
		from selling.utils.product import invalidate_cache_for
		invalidate_cache_for(self.doc.item_group)
		[invalidate_cache_for(d.item_group) for d in \
			self.doclist.get({"doctype":"Website Item Group"})]

		WebsiteGenerator.on_update(self)
Пример #2
0
    def update_website(self):
        from selling.utils.product import invalidate_cache_for
        invalidate_cache_for(self.doc.item_group)
        [invalidate_cache_for(d.item_group) for d in \
         self.doclist.get({"doctype":"Website Item Group"})]

        WebsiteGenerator.on_update(self)
Пример #3
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		
		# clear all cache if it has toc
		if self.doclist.get({"parentfield": "toc"}):
			from webnotes.webutils import clear_cache
			clear_cache()
Пример #4
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		self.if_home_clear_cache()
		
		# clear all cache if it has toc
		if self.doclist.get({"parentfield": "toc"}):
			from webnotes.webutils import clear_cache
			clear_cache()
Пример #5
0
	def on_update(self):
		DocTypeNestedSet.on_update(self)
		WebsiteGenerator.on_update(self)
		
		self.validate_name_with_item()
		
		from selling.utils.product import invalidate_cache_for
		invalidate_cache_for(self.doc.name)
				
		self.validate_one_root()
Пример #6
0
    def on_update(self):
        DocTypeNestedSet.on_update(self)
        WebsiteGenerator.on_update(self)

        self.validate_name_with_item()

        from selling.utils.product import invalidate_cache_for
        invalidate_cache_for(self.doc.name)

        self.validate_one_root()
Пример #7
0
	def on_trash(self):
		# delete entry from Table of Contents of other pages
		WebsiteGenerator.on_trash(self)
		
		webnotes.conn.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 webnotes.webutils import clear_cache
			clear_cache()
Пример #8
0
	def if_home_clear_cache(self):
		"""if home page, clear cache"""
		if webnotes.conn.get_value("Website Settings", None, "home_page")==self.doc.name:
			if webnotes.conn.exists("Website Sitemap", "index"):
				webnotes.delete_doc("Website Sitemap", "index", ignore_permissions=True)
			WebsiteGenerator.on_update(self, page_name="index")

			from webnotes.sessions import clear_cache
			clear_cache('Guest')
			
			from webnotes.webutils import clear_cache
			clear_cache(self.doc.page_name)
			clear_cache('index')
Пример #9
0
	def on_trash(self):
		webnotes.conn.sql("""delete from tabBin where item_code=%s""", self.doc.item_code)
		WebsiteGenerator.on_trash(self)
Пример #10
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		webnotes.webutils.delete_page_cache("writers")
Пример #11
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		if self.doc.page_name:
			clear_cache("partners")
Пример #12
0
 def on_trash(self):
     webnotes.conn.sql("""delete from tabBin where item_code=%s""",
                       self.doc.item_code)
     WebsiteGenerator.on_trash(self)
Пример #13
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		clear_cache("writers")