Oh - I managed to figure this out on my own, its quite simple (told you it
was a newbie question).
In the template itself (topic.html in my case) I just need to add the
tables extension to the markdown call.
Before I used this in the template:
...
$:markdown(response.content)
...
Now to turn on the tables extension I need to change that to the following
in the template:
...
$:markdown(response.content, ['tables'])
...
On Tuesday, August 6, 2013 12:38:38 PM UTC+8, Andrew Mills wrote:
>
> Hi all, newbie question here:
>
> I would like to use the 'tables' extension for Markdown in web.py. Right
> now I access markdown as follows:
>
> ### Templates
> t_globals = {
> 'datestr': web.datestr,
> 'markdown': markdown.markdown
> }
>
> # Define where the basic page template is located relative to
> # this python code (./templates/base.html)
> render = web.template.render('templates/', base = 'base', globals =
> t_globals)
>
> I would like to use Markdown to create simple tables in a wiki:
> http://pythonhosted.org/Markdown/extensions/tables.html
>
> According to the python doc's I should be able to access tables via:
>
>
> >>> html = markdown.markdown(text, ['tables'])
>
> How can I do this in web.py?
>
> Thanks!
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/groups/opt_out.