On Jan 13, 8:30 am, Axl <ax...@freenet.de> wrote:
> web2py on first glance is by far
> the slickest web development platform I've encountered so far.

It gets better :)

> So, I've tried the cookbook tutorial in the pdf with the 1.5.4 version
> for OS X and everything works until the recipes(), show() and
> new_recipe() controller functions are introduced. This code:
>
> def recipes():
>     records = db(db.recipe.category == request.vars.catetory)\
>                 .select(orderby = db.recipe.title)
>     form = SQLFORM(db.recipe, fields = ['category'])
>     return dict(form = form, records = records)
>
> make s form without any action. So, consequently, when I push send, no
> recipes are retrieved.

request.vars.category

> def new_recipe():
>     form = SQLFORM(db.recipe, fields = ['title', 'description', \
>                                        'category', 'instructions'])
>     if form.accepts(request.vars, session):
>         redirect(URL(r = request, f = 'recipes'))
>         return dict(form = form)
>
> just gives me an empty page with the word 'none'. No error whatsoever.

Looks like an indentation issue: move the last line 4 spaces to the
left.

F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to