
from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache

class DocType(WebsiteGenerator):
	def __init__(self, d, dl):
		self.doc, self.doclist = d, dl
	
	def get_page_title(self):
		return self.doc.title
		
	def on_update(self):
		WebsiteGenerator.on_update(self)

		from webnotes.webutils import clear_cache
		clear_cache()
		

from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache

class DocType(WebsiteGenerator):
	def __init__(self, d, dl):
		self.doc, self.doclist = d, dl
		
	def autoname(self):
		# to override autoname of WebsiteGenerator
		self.doc.name = self.doc.category_name
	
	def get_page_title(self):
		return self.doc.title
		
	def on_update(self):
		WebsiteGenerator.on_update(self)

		from webnotes.webutils import clear_cache
		clear_cache()
		
Fix in Blog Category Naming
Fix in Blog Category Naming

  
  from __future__ import unicode_literals
  import webnotes
  from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache
  
  class DocType(WebsiteGenerator):
  	def __init__(self, d, dl):
  		self.doc, self.doclist = d, dl
+ 		
+ 	def autoname(self):
+ 		# to override autoname of WebsiteGenerator
+ 		self.doc.name = self.doc.category_name
  	
  	def get_page_title(self):
  		return self.doc.title
  		
  	def on_update(self):
  		WebsiteGenerator.on_update(self)
  
  		from webnotes.webutils import clear_cache
  		clear_cache()
  		
Fix in Blog Category Naming
## Code Before:

from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache

class DocType(WebsiteGenerator):
	def __init__(self, d, dl):
		self.doc, self.doclist = d, dl
	
	def get_page_title(self):
		return self.doc.title
		
	def on_update(self):
		WebsiteGenerator.on_update(self)

		from webnotes.webutils import clear_cache
		clear_cache()
		
## Instruction:
Fix in Blog Category Naming
## Code After:

from __future__ import unicode_literals
import webnotes
from webnotes.webutils import WebsiteGenerator, cleanup_page_name, clear_cache

class DocType(WebsiteGenerator):
	def __init__(self, d, dl):
		self.doc, self.doclist = d, dl
		
	def autoname(self):
		# to override autoname of WebsiteGenerator
		self.doc.name = self.doc.category_name
	
	def get_page_title(self):
		return self.doc.title
		
	def on_update(self):
		WebsiteGenerator.on_update(self)

		from webnotes.webutils import clear_cache
		clear_cache()
		