I tried using this answer located here:
http://stackoverflow.com/questions/9679090/using-modules-in-views/9680031#9680031

Here is the response i'm trying to follow (so you don't have to click the 
link).

-----------------

Just for record.

It is not a good idea to use locals()

instead of passing locals to response.render, it is better to create a 
dictionary with the keys you want to be available for the view to be 
rendered.

You can also include a reference to markdown on that dictionary

from gluon.contrib.markdown.markdown2 import markdown
mydict = dict(markdown=markdown, anotherkey=anothervalue)return 
response.render("path/to/view", mydict)

Dont try to extend locals() in to mydict, you will run in to problems if 
you try this.

Also you can just use the default web2py behavior

from gluon.contrib.markdown.markdown2 import markdown
response.view = "path/to/view"return dict(markdown=markdown, 
anotherkey=anothervalue)

another option for you is to import markdown in a model file.

---------------------------


What does he mean by anotherkey=anothervalue? If my dictionary is called 
queryDict and I have a lot of values I'd like to be returned how could I 
return them all using markdown?

Sorry if this is noobish, I love web2py and am trying to use it for 
everything.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to