Hi, I am trying to follow this tutorial Generators
This is not very informative.
What I am trying to achieve:
- I want to change Web View of DocType using Website Generator.
What I am doing:
-
I created doctype named Item.
-
I created class that inherits from WebsiteGenerator
class Item(website_generator.WebsiteGenerator): website = frappe._dict( template = "templates/item.html", condition_field = "publish", ) def get_context(self, context): context.some_context = 'some_context'
-
Added my DocType into list website_generators in hooks.py
-
Created html-file ‘item.html’ in templates
What i am getting:
- Nothing. Web View of this doctype does not change.
- I accidentally found out how to change web view of DocTypes list, this is very good.
Do i need to specify value for a field “route” for a doctype?