fixes in website page_name for item
This commit is contained in:
parent
35b6d94c06
commit
feee252093
@ -77,7 +77,7 @@ class DocType:
|
||||
|
||||
def update_website(self):
|
||||
from website.utils import update_page_name
|
||||
update_page_name(self.doc, self.doc.item_name)
|
||||
update_page_name(self.doc, self.doc.name + " " + self.doc.item_name)
|
||||
|
||||
from website.helpers.product import invalidate_cache_for
|
||||
invalidate_cache_for(self.doc.item_group)
|
||||
|
@ -97,7 +97,7 @@ def page_name(title):
|
||||
import re
|
||||
name = title.lower()
|
||||
name = re.sub('[~!@#$%^&*()<>,."\']', '', name)
|
||||
return '-'.join(name.split()[:8])
|
||||
return '-'.join(name.split())
|
||||
|
||||
def update_page_name(doc, title):
|
||||
"""set page_name and check if it is unique"""
|
||||
|
Loading…
Reference in New Issue
Block a user