This is actually python. It is string insertion with a dictionary
instead of a list. Basically it is taking the Record (which is a
dictionary) and string substituting it in.

Where in the first form you have

"Hello %s. This is a string" % ("world")
Hello world. This is a string

And in this form you have

"Hello %(myvar). This is a string" % {'myvar': 'paris'}
Hello paris. This is a string

-Thadeus





On Tue, Mar 16, 2010 at 3:33 PM, Magnitus <eric_vallee2...@yahoo.ca> wrote:
> Web/Pdf Ambiguity:
>
> In section 3.6, line 16 of the model (the "'%(title)s'" part) is
> probably the hardest part of the code to grasp (it was for me) and yet
> very little elaboration is provided (leaving the reader wondering).
>
> It was not immediately clear to me that it was strictly for the
> presentation to the user with the FORM API as opposed something
> implemented directly IN the database.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to