mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
clear cache in website
This commit is contained in:
@@ -32,11 +32,13 @@ class DocType(DocTypeNestedSet):
|
||||
# webpage updates
|
||||
from website.utils import update_page_name
|
||||
page_name = self.doc.name
|
||||
if webnotes.conn.get_value("Website Settings", None,
|
||||
if webnotes.conn.get_value("Product Settings", None,
|
||||
"default_product_category")==self.doc.name:
|
||||
page_name = "products"
|
||||
from website.utils import clear_cache
|
||||
clear_cache()
|
||||
|
||||
update_page_name(self.doc, self.doc.name)
|
||||
update_page_name(self.doc, page_name)
|
||||
|
||||
from website.helpers.product import invalidate_cache_for
|
||||
invalidate_cache_for(self.doc.name)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"docstatus": 0,
|
||||
"creation": "2012-12-07 15:15:28",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-12-27 10:38:02"
|
||||
"modified": "2012-12-27 18:50:20"
|
||||
},
|
||||
{
|
||||
"in_create": 1,
|
||||
@@ -52,6 +52,7 @@
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
"read_only": 1,
|
||||
"doctype": "DocField",
|
||||
"label": "Page Name",
|
||||
"fieldname": "page_name",
|
||||
|
||||
Reference in New Issue
Block a user