[web2py] Re: Store value in input field in a table

2017-01-09 Thread Joe Lwe
Hi.. I have the same challange, did u get a solution.. if yes kindly share.. but I guess the coordinates have to be stored in location field of the table. Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

[web2py] Geo location in the Address field of SQL form

2017-01-01 Thread Joe Lwe
Hi Friends, Thanks so much for your efforts of web2py, i need your help on the challenges i have below. How can i have automatic lookup of locations/address in the address field of sqlform geo location feature. I am thinking its a way of avoiding the need to type in countries, districts/states

Re: [web2py] Adding user to a group after registration

2016-11-29 Thread Joe Lwe
> > > Thanks Anthony, > auth.id_group takes the *name* (not id) of a role stored in the db.auth_group table and returns the id of that role. was so useful. This worked for me def add_user_membership(form): group_id=form.vars.group_name user_id=form.vars.id auth.add_membership(gro

Re: [web2py] Adding user to a group after registration

2016-11-27 Thread Joe Lwe
Hi Kumar, am at the wall with the same problem you hard, am not having success below is my code, its from the account type table that i have defined account type Any assistance is so much appreciated. Thank you /dbypy file db.define_table('account_type', Field('name', 'string', length=20, not

Re: [web2py] Re: What is the problem with mu code

2016-11-24 Thread Joe Lwe
group_id = group_id2)) > > instead of group_id = ... you can specify the name of the group role = > 'groupname' > > > On Saturday, 19 November 2016 07:48:30 UTC-6, Joe Lwe wrote: >> >> >> Hi Pierro, >> I have defined custom groups in db(buyer,selle

[web2py] Re: What is the problem with mu code

2016-11-19 Thread Joe Lwe
is called and what username and > account_type are for you? > > > > > On Sunday, 13 November 2016 05:17:11 UTC-6, Joe Lwe wrote: >> >> >> def add_user_memberhip(): >> if auth.settings.register_onaccept==True: >> group_id = re

[web2py] What is the problem with mu code

2016-11-13 Thread Joe Lwe
def add_user_memberhip(): if auth.settings.register_onaccept==True: group_id = request.vars.account_type user_id = request.vars.username auth.add_membership(group_id,user_id) response.flash="You have been added to"+group_id else: response.flash='An E

[web2py] Account registration progress

2016-11-03 Thread Joe Lwe
Hi, Thanks for your support to web2py, i have added extra fields to signup form, but i need the profile of user registered to be completed so that they fill form data in sequence as e.g if user registers as business, then the next form should be to add their business details, then add product

[web2py] Re: groups and access control

2016-10-23 Thread Joe Lwe
ld ('role'), Field('description')) ?? Thanks again On Thursday, October 13, 2016 at 1:53:32 PM UTC+3, Marlysson Silva wrote: > > B) To verify user permission use these decorators , using membership or > permission decorators. > > http://web2py.com/book

[web2py] groups and access control

2016-10-11 Thread Joe Lwe
Hello, a)How can i specify automatic group assignment on creation of user based on a particular condition. Consider, on signup form a user can select if he is registering as a business or an individual.. if user selects business account is automatically assigned group business else assigned to in