On Wed, Sep 30, 2009 at 1:50 PM, Oscar Del Ben <[email protected]> wrote: > > Hi, I have a problem passing a variable to templator. Here's the code: > > def GET(self): > contests = simplejson.load(urllib2.urlopen('my_url')) > return render.contests(contests) > > When I load this page, I get: > > Trace/BPT trap > > The problem resides in the argument passed, because if I simply use > render.contests({'contests': [{'start_date': '2009-09-21 02:10:00 > -0700', 'end_date': '2009-11-23 14:59:00 -0800', 'title': 'Test'}]}) I > still get the error. Any idea? For now I'll do everything in the > template, which I'd like to avoid.
render.contents is like a regular python function/method. You can try calling it as render.contents(**contents) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
