On Jan 13, 1:48 pm, Fran <[email protected]> wrote: > > 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
Oh my... a typo! I could have sworn I triple checked. > > 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 All is working now. I hadn't really thought about this indentation thing. It probably saves you from writing brackets or typing something like 'end'. I think I'm gonna like Python. Thanks very much, Francis. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

