I am using the latest version of web.py.
I am trying to print data from the database to a webpage.
The code i use is the following
import web
from google.appengine.ext import db
from models import *
urls = (
'/', 'index',
)
render = web.template.render('templates', base='base')
class index:
def GET(self):
votes = db.GqlQuery("SELECT * FROM votes")
return render.index(votes)
app = web.application(urls, globals())
main = app.cgirun()
the template is the following
$def with(votes)
$for vote in votes:
<li>$vote.status</li>
and i am getting this when i run it
[<models.votes object at 0x0000000004525F28>]
Is this a bug with the new version cause in previous version it works.
I forgot to say that i am compiling my templates as stated here.
It works on my machine, running the latest web.py 0.36 with this code:
main.py
templates/index.html
templates/base.html
this is the result: