'Ensure that website generator has field \'route\''

def validate_website(self):

    if self.has_web_view:
        if (not (u'route' in [d.fieldname for d in self.fields])):
            frappe.throw(u'Field    "route"    is    mandatory    for    Web    Views', title=u'Missing    Field')
        frappe.website.render.clear_cache()
