コード例 #1
0
	def on_update(self):
		"""make home html"""
		from website.utils import make_template
		import os
		path = os.path.join(os.path.dirname(__file__), 'template.html')
		
		webnotes.conn.set_value('Page', 'contact', 'title', self.doc.headline)
		webnotes.conn.set_value('Page', 'contact', 'content', make_template(self.doc, path))
コード例 #2
0
ファイル: contact_us_settings.py プロジェクト: ant0nk/erpnext
    def on_update(self):
        """make home html"""
        from website.utils import make_template
        import os
        path = os.path.join(os.path.dirname(__file__), 'template.html')

        webnotes.conn.set_value('Page', 'contact', 'title', self.doc.headline)
        webnotes.conn.set_value('Page', 'contact', 'content',
                                make_template(self.doc, path))
コード例 #3
0
    def on_update(self):
        """make home html"""
        from website.utils import make_template
        import os
        path = os.path.join(os.path.dirname(__file__), 'template.html')

        self.doc.about_team = webnotes.conn.sql(
            """select * from `tabAbout Us Team` 
			where parent='About Us Settings' order by idx""",
            as_dict=1)

        import markdown2
        for t in self.doc.about_team:
            t['bio'] = markdown2.markdown(t.get('bio') or '')

        webnotes.conn.set_value('Page', 'about', 'title', self.doc.headline)
        webnotes.conn.set_value('Page', 'about', 'content',
                                make_template(self.doc, path))
コード例 #4
0
ファイル: about_us_settings.py プロジェクト: antoxin/erpnext
    def on_update(self):
        """make home html"""
        from website.utils import make_template
        import os

        path = os.path.join(os.path.dirname(__file__), "template.html")

        self.doc.about_team = webnotes.conn.sql(
            """select * from `tabAbout Us Team` 
			where parent='About Us Settings' order by idx""",
            as_dict=1,
        )

        import markdown2

        for t in self.doc.about_team:
            t["bio"] = markdown2.markdown(t.get("bio") or "")

        webnotes.conn.set_value("Page", "about", "title", self.doc.headline)
        webnotes.conn.set_value("Page", "about", "content", make_template(self.doc, path))