Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 7
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')
Ejemplo n.º 8
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		webnotes.webutils.delete_page_cache("writers")
Ejemplo n.º 9
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		if self.doc.page_name:
			clear_cache("partners")
Ejemplo n.º 10
0
	def on_update(self):
		WebsiteGenerator.on_update(self)
		clear_cache("writers")