Yes, that's what i'm trying to achive. For now i have three tables: ingredients, tags and data. Data table defined with - Field('ingredients', 'list:reference tag_ingr'),
tags - db.define_table('tag_ingr', Field('name', type='string'), format='%(name)s') And ingredient table have link to tag - Field('tag_id', db.tag_ingr, label=T('tag id')) So i have table t_filter which havee list of references which is tags and now i'm trying to search throught it. When i'm searchig throught the tags, i'm trying to use 'belongs' but it gives zero results: db(db.t_filter.ingredients.belongs(ids).select() What is correct way to search throught list:reference ? понедельник, 27 марта 2017 г., 16:11:53 UTC+3 пользователь Marlysson Silva написал: > > You want select many images , highlight them and search at database by > ids's images highlighted ? > > Real-time? > > Em segunda-feira, 20 de março de 2017 10:40:13 UTC-3, Scorpa escreveu: >> >> Hello folks! >> >> I'm struggling with one idea: >> I want to make visual filter such as - you can click on any image from >> predefined set (select from db) then this image will be highlited and now >> interesting part: >> i want to make select from database based on the id of this image like >> for example: db(db.t_thing.id == request.vars.thing_id).select() >> Then user can select another image and this id should be added to list. >> I implemented tagging for this and took search function from this manual >> https://www.packtpub.com/mapt/book/web-development/9781849515467/3/ch03lvl1sec43/efficiently-searching-by-tag >> >> >> i made ajax >> ajax('{{=URL('default', 'filter_thing', vars=dict(thing_id=thing.id))}}' >> ,[], 'things'); >> >> >> but obviously this will overwrite variable. >> >> >> So the question is - how to append variables to list ? >> >> Thank you ! >> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.