fixes in website page_name for item

This commit is contained in:
Nabin Hait 2013-01-17 13:03:30 +05:30
parent 35b6d94c06
commit feee252093
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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"""