[web2py] Re: response view with markdown

2017-10-20 Thread 黄祥
got it, pretty much clear, thanks anthony, massimo and bernhart, perhaps for now i just stick with the bernhart code to transform markdown into html in controller, because i don't know how to create generic.md (or generic.markdown) that will transform markdown into html, hehe thanks and best re

[web2py] Re: response view with markdown

2017-10-20 Thread Anthony
On Tuesday, October 17, 2017 at 5:29:24 PM UTC-4, 黄祥 wrote: > > why web2py can't render the views in markdown format that been assign > (*.md) in most simple way? > e.g. > def testmd(): > response.view = 'default/testmd.md' > #response.render = 'default/testmd.md' > return locals() > >

[web2py] Re: response view with markdown

2017-10-18 Thread Massimo Di Pierro
Just create a generic view that does it. It is a good exercise. On Tuesday, 17 October 2017 16:29:24 UTC-5, 黄祥 wrote: > > why web2py can't render the views in markdown format that been assign > (*.md) in most simple way? > e.g. > def testmd(): > response.view = 'default/testmd.md' > #resp

[web2py] Re: response view with markdown

2017-10-17 Thread 黄祥
why web2py can't render the views in markdown format that been assign (*.md) in most simple way? e.g. def testmd(): response.view = 'default/testmd.md' #response.render = 'default/testmd.md' return locals() think about github pages can render it thanks and best regards, stifan --

[web2py] Re: response view with markdown

2017-10-16 Thread 黄祥
yes you are right, anthony, forgot to put the controllers in the response view. thanks. it's work like charm, thanks bernhard. e.g. controllers/default.py def testmd(): #response.view = 'default/testmd.md' #return locals() # Read plugin description and display. # Some logic i

[web2py] Re: response view with markdown

2017-10-15 Thread Bernhard Radermacher
I use the following to display the contents of a MARKDOWN. from https://github.com/bradermacher/web2py-plugin-authman/blob/master/controllers/plugin_authman.py def index(): # Read plugin description and display. # Some logic in view (status of plugin and authorization from os.path

[web2py] Re: response view with markdown

2017-10-15 Thread Anthony
It should be: response.view = 'default/testmd.md' Also, anything outside the {{...}} delimiters in a view will simply be returned as is, so any markdown in the file will be sent to the browser untransformed. Anthony On Sunday, October 15, 2017 at 8:32:44 AM UTC-4, 黄祥 wrote: > > i plan to