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
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()
>
>
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
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
--
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
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
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
7 matches
Mail list logo