If you benefit from web2py hope you feel encouraged to pay it forward by contributing back to society in whatever form you choose!


  • 1
    rochacbruno  12 years ago

    Should be:

     

    rows=db(db.recipe.category==request.vars.category).select(db.recipe.ALL)

     

    note the ==

    replies (2)
    • blueshadow 12 years ago

      stupid me just watched it again he gets an error and uses a secon equal sign. O man I need to pay more attention^^

    • blueshadow 12 years ago

      thanks it works even though in the video it worked with a single equal sign Oo

Commented on:

Hi I found an old video from Massimo Di Pierro(when web2py was called gluon)

where he explains how to do an application called recipes: http://vimeo.com/428474

which is very helpful but on one pint the code doesn't work anymore. He has a table for recipes and one for categories.

on one pint pretty much in the end of the video he wants to list all the recipies belonging to one category.

he does it by the following code: try: rows=db(db.recipe.category=request.vars.category).select(db.recipe.ALL)

but when I try to replicate it I cant even compile it with the error keyword can't be an expression.

can anyone help?

 


Hosting graciously provided by:
Python Anywhere