[web2py] Re: Polls doesn't work in GAE

2010-03-05 Thread Yarko Tymciurak
as an aside, wiki.web2py.com seems to be stuck generating tickets... On Mar 5, 8:14 am, mdipierro wrote: > change this >    selected_choice.update_record(votes=db.choice.votes+1) >  into >    selected_choice.update_record(votes=seleted_choice.votes+1) > > Mind that I tried to code the original D

[web2py] Re: Polls doesn't work in GAE

2010-03-05 Thread mdipierro
change this selected_choice.update_record(votes=db.choice.votes+1) into selected_choice.update_record(votes=seleted_choice.votes+1) Mind that I tried to code the original Django app so that it would make the original SQL queries. That is way it does not work on GAE. On Mar 5, 12:58 am, mdm

[web2py] Re: Polls doesn't work in GAE

2010-03-04 Thread mdmcginn
Thanks. Now the pages display successfully that show the poll results and the voting options: http://localhost:8080/Polls/default/detail/9 and http://localhost:8080/Polls/default/results/9. But when I voted, I got errors with http://localhost:8080/Polls/default/detail/9 - my vote wasn't saved. The

[web2py] Re: Polls doesn't work in GAE

2010-03-03 Thread mr.freeze
I think the problems is that poll doesn't have a foreign key to choice, it's the other way around. Try this: {{poll_choices = db(db.choice.poll==poll.id).select()}} {{ for choice in poll_choices: }} {{=choice.choice }} -- {{=choice.votes }} vote{{if choice.votes!=1:}}s{{pass}} {{ pass } On Ma

[web2py] Re: Polls doesn't work in GAE

2010-03-03 Thread mdmcginn
db.define_table('poll', Field('question',length=200), Field('pub_date','datetime',default=request.now,writable=False)) db.define_table('choice', Field('poll',db.poll), Field('choice',length=200), Field('votes','integer',default=0)) db.define_table('recorded_votes

[web2py] Re: Polls doesn't work in GAE

2010-03-01 Thread mr.freeze
Can we see your model? On Mar 1, 9:05 pm, mdmcginn wrote: > From index.html: > Latest Polls > Answer the question [vote] [results] > > When I click on [results], I'm sent > tohttp://localhost:8080/Polls/default/results/67 > > ERROR    2010-03-02 02:54:08,609 restricted.py:53] In FILE: /home/ > m

[web2py] Re: Polls doesn't work in GAE

2010-03-01 Thread mdmcginn
>From index.html: Latest Polls Answer the question [vote] [results] When I click on [results], I'm sent to http://localhost:8080/Polls/default/results/67 ERROR2010-03-02 02:54:08,609 restricted.py:53] In FILE: /home/ michael/mycode/google_appengine/web2py/applications/Polls/views/ default/re

[web2py] Re: Polls doesn't work in GAE

2010-03-01 Thread mdipierro
Can you show us the traceback. It should work. On Mar 1, 3:40 am, mdmcginn wrote: > The Polls application (fromhttp://wiki.web2py.com/Polls_Tutorial) > doesn't work in GAE, though I can't read the tickets. The controller > seems to be okay, but not the view (detail and results.html). > > Controll