Thanks a lot, Bruno! I didn't read carefully enough, sorry for that.
The slides model is working in general now, but I am getting the same
render bug like some posts before regarding the links. Will reply to
the corresponding post.

Jan

On 12 Okt., 00:01, Bruno Rocha <rochacbr...@gmail.com> wrote:
> you are putting it in modules while it has to be in models.
>
> if you want it in modules you will need to explicitely import all web2py
> helpers and context.
>
> from gluon import *
>
> http://zerp.ly/rochacbruno
> Em 11/10/2011 16:28, "jotbe" <jan.beili...@gmail.com> escreveu:
>
>
>
>
>
>
>
> > Thanks for the module, Massimo!
>
> > Unfortunately, it is not working in a test app:
>
> > ## snip ##
> > $ python web2py.py -P -M -S slides
> > web2py Web Framework
> > Created by Massimo Di Pierro, Copyright 2007-2011
> > Version 1.99.3 (2011-09-26 10:32:57) dev
> > Database drivers available: SQLite3, pymysql
> > Python 2.7.2 (default, Jul 27 2011, 15:07:16)
> > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
> > Type "help", "copyright", "credits" or "license" for more information.
> > (InteractiveConsole)
> > >>> from applications.slides.modules.slide import SLIDE
> > >>> content = """
> > ... # My slides title
> > ... ## Slide One
> > ... this allows you to create slides using markmin
> > ... ## Slide Two
> > ... - you can use lists
> > ... - you can use [[linkshttp://www.google.com]]
> > ... - you can use images [[imagehttp://image.example.comcenter]]
> > ... """
> > >>> SLIDE(content, title='Sample slide')
> > Traceback (most recent call last):
> >  File "<console>", line 1, in <module>
> >  File "applications/slides/modules/slide.py", line 46, in SLIDE
> >    html = str(MARKMIN(body,extra=extra))
> > NameError: global name 'MARKMIN' is not defined
> > >>> print MARKMIN(content)
> > <h1>My slides title</h1><h2>Slide One</h2><p>this allows you to create
> > slides using markmin</p><h2>Slide Two</h2><ul><li>you can use lists</
> > li><li>you can use <img src="http://image.example.com"; alt="links <a
> > href="http://www.google.com";>http://www.google.com</a>]]</li><li>you
> > can use images [[image" align="center" /></li></ul>
> > ## snap ##
>
> > What am I doing wrong? :)
>
> > Greetings,
>
> > Jan
>
> > On 10 Sep., 21:24, Massimo Di Pierro <mdipie...@cs.depaul.edu> wrote:
> > > Based on desk.js now you can do this
>
> > > Put the attached slide.py under models (any app).
>
> > > Write a controller like
>
> > > def  test():
> > >     content = """
> > > # My slides title
> > > ## Slide One
> > > this allows you to create slides using markmin
> > > ## Slide Two
> > > - you can use lists
> > > - you can use [[linkshttp://www.google.com]]
> > > - you can use images [[imagehttp://image.example.comcenter]]
> > > """
> > >    return SLIDE(content,title="My slides")
>
> > > Notice the resulting file is pure html5 with external links therefore it
> > can be downloaded as an independent document.
>
> > >  slide.py
> > > 2KAnzeigenHerunterladen

Reply via email to