[web2py] Re: link to item on list.

2013-09-09 Thread אבי אברמוביץ
Alright, that works for me: items = db().select(db.t_items.ALL, cache=(cache.ram, 60)) I guess there is a method to create a select request on the background? for the list the user is currently watching or even to other queries that the user might get to via the page links? Thanks. On Monday,

[web2py] Re: link to item on list.

2013-09-09 Thread Anthony
On Monday, September 9, 2013 11:20:02 AM UTC-4, אבי אברמוביץ wrote: > Thanks, yes, I know of the item.id problem for next and previous, I just > used it for now I'll try to do something with the > http://docs.python.org/2/library/functions.html#enumerate later on.Will I > also have to ask from

[web2py] Re: link to item on list.

2013-09-09 Thread אבי אברמוביץ
Thanks, yes, I know of the item.id problem for next and previous, I just used it for now I'll try to do something with the http://docs.python.org/2/library/functions.html#enumerate later on.Will I also have to ask from the controller to change each item page meta data for google indexing? On M

[web2py] Re: link to item on list.

2013-09-09 Thread Anthony
The query will happen on every page request, though you can cache it. There's another problem, though -- in the list view, the arg in the link is the item.id, but in the individual item view, you use t

[web2py] Re: link to item on list.

2013-09-09 Thread אבי אברמוביץ
After some tries I got to this, which works fine: My question is if the controller "saves" the "items" dict, or it queries for it on every time the view calls it (when moving between pages using the next/previous links? Thanks. controller def index(): items = db(db.t_items).select() ret

[web2py] Re: link to item on list.

2013-09-01 Thread אבי אברמוביץ
Great, thanks. On Sunday, September 1, 2013 9:40:25 AM UTC+3, אבי אברמוביץ wrote: > > Hi, > I understand the url structure: app/function/view > but assuming I have a list of items on the view, How do I get to a view > page for each one of them and where can I build that page template? > Thanks.

[web2py] Re: link to item on list.

2013-09-01 Thread Anthony
You could use a URL arg to identify specific items and trigger a single-item display when present: def myitems(): item = get_my_item(request.args(0)) if request.args else None item_list = generate_list() if not request.args else None return dict(item=item, item_list=item_list) {{if i

[web2py] Re: link to item on list.

2013-09-01 Thread Massimo Di Pierro
Do not understand. Can you show an example? On Sunday, 1 September 2013 01:40:25 UTC-5, אבי אברמוביץ wrote: > > Hi, > I understand the url structure: app/function/view > but assuming I have a list of items on the view, How do I get to a view > page for each one of them and where can I build that