first of all excuse me for my lameness in django, python and html.
I added widget to html, and I want to fill the items from the database. I tried the following but its not working, it shows only the obvious (‘ALL’ item):
HTML:
<select name=\"accountName\" >
<option value=\"ALL\">ALL</option>
{% for item in select_items %}
<option value=\"'+item.accountName+'\">'+item.accountName+'</option>
{% endfor %}
</select>
Python:
class StartPage(webapp.RequestHandler):
def get(self):
select_items = db.GqlQuery( "SELECT * FROM Registration" )
self.response.out.write(template.render("tst.html", {'select_items': select_items}))
Note, the DB do contains stuff,and not empty.
Thanx
I am not a django expert, but I think your templatehas some errors.
should be
For more information:
https://docs.djangoproject.com/en/dev/topics/templates/