[web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
Hi, I'm doing something like that: if auth.user: my_org = db(db.t_org_members.f_org_member == auth.user.id).select(db.t_org_members.f_org_rep) if my_org: for m in my_org: my_org_members = db(db.t_org_members.f_org_rep ==

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Jonathan Lundell
On 27 Dec 2013, at 9:53 AM, Avi A aviavi...@gmail.com wrote: Hi, I'm doing something like that: if auth.user: my_org = db(db.t_org_members.f_org_member == auth.user.id).select(db.t_org_members.f_org_rep) if my_org: for m in my_org:

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
Thanks, I wasn't wrong, this is what I need: {{for member in org_member_data:}} what do you mean by: org_member_data is set to a single member's data, so it ends up with the last one it was set to. ? or: or perhaps collect org_member_data instances in a list? i return it as a dict or as

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Jonathan Lundell
On 27 Dec 2013, at 10:23 AM, Avi A aviavi...@gmail.com wrote: Thanks, I wasn't wrong, this is what I need: {{for member in org_member_data:}} what do you mean by: org_member_data is set to a single member's data, so it ends up with the last one it was set to. ? or: or perhaps collect

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
Alright, I see what you mean. I'll give it a try. Thanks. On Friday, December 27, 2013 8:37:55 PM UTC+2, Jonathan Lundell wrote: On 27 Dec 2013, at 10:23 AM, Avi A avia...@gmail.com javascript: wrote: Thanks, I wasn't wrong, this is what I need: {{for member in org_member_data:}} what

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
for case my_org is empty i wrote: if my_org: not good enough? (if not empty?) On Friday, December 27, 2013 8:37:55 PM UTC+2, Jonathan Lundell wrote: On 27 Dec 2013, at 10:23 AM, Avi A avia...@gmail.com javascript: wrote: Thanks, I wasn't wrong, this is what I need: {{for member in

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Jonathan Lundell
On 27 Dec 2013, at 10:53 AM, Avi A aviavi...@gmail.com wrote: for case my_org is empty i wrote: if my_org: not good enough? (if not empty?) If that happens, what does the view see? On Friday, December 27, 2013 8:37:55 PM UTC+2, Jonathan Lundell wrote: On 27 Dec 2013, at 10:23 AM, Avi A

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
user logged in the view: if he is in a group: till now he will see the group members' data and take some action later on. else: will sign up for a group. after page refresh will see the group members' data. (will have a different page for modifying subscription.) On Friday, December 27, 2013

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
Now I am able to get the list as you suggested with append. But i don't know how to render it. This is what I try in the view but it says that NameError: name 'auth_user' is not defined: {{for member in org_member_data:}} option{{=member[auth_user.email]}}/option {{pass}} On Friday,

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Jonathan Lundell
On 27 Dec 2013, at 2:20 PM, Avi A aviavi...@gmail.com wrote: Now I am able to get the list as you suggested with append. But i don't know how to render it. This is what I try in the view but it says that NameError: name 'auth_user' is not defined: {{for member in org_member_data:}}

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
member.auth_user.email throws the same error. auth_user.email is defined in the select on the controller, as far as i understand, among other fields from the auth user table.. On Saturday, December 28, 2013 12:35:54 AM UTC+2, Jonathan Lundell wrote: On 27 Dec 2013, at 2:20 PM, Avi A

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Jonathan Lundell
On 27 Dec 2013, at 2:42 PM, Avi A aviavi...@gmail.com wrote: member.auth_user.email throws the same error. auth_user.email is defined in the select on the controller, as far as i understand, among other fields from the auth user table.. It's not. Try member.email. If that doesn't work, just

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
yes i tried that one too. {{=member}} renders inside each option atable with expected data: tabletheadtrthauth_user.phone_num/ththauth_user.car_num_0/th thauth_user.email/ththauth_user.profile_image/thth auth_user.first_name/ththauth_user.last_name/th/tr/theadtbodytr

Re: [web2py] only last item on the dict is rendered.

2013-12-27 Thread Avi A
I created a dict instead of a list and I'm getting there...thanks. On Saturday, December 28, 2013 12:44:09 AM UTC+2, Jonathan Lundell wrote: On 27 Dec 2013, at 2:42 PM, Avi A avia...@gmail.com javascript: wrote: member.auth_user.email throws the same error. auth_user.email is defined in the