[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread Anthony
Please show the new version of index(). On Wednesday, June 6, 2018 at 5:40:48 PM UTC-4, b.l. masters wrote: > > I feel like I must be missing some basic step here. So would I put these > settings like this, in default.py?: > > def user(): > auth.settings.registration_requires_verification =

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread b.l. masters
I feel like I must be missing some basic step here. So would I put these settings like this, in default.py?: def user(): auth.settings.registration_requires_verification = False auth.settings.registration_requires_approval = False auth.settings.login_after_registration = True

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread b.l. masters
That is what I have done, is place them in db.py. And that is what is not working. These are what I already have in my db.py: auth.settings.remember_me_form=False auth.settings.registration_requires_verification = False auth.settings.registration_requires_approval = False

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread Anthony
On Wednesday, June 6, 2018 at 4:48:48 PM UTC-4, b.l. masters wrote: > > So by "auth.register() itself handles the form processing, automatic > login, and redirect": Do you mean, that these functions are applied in the > pre-processing (as you also mention), so I can't alter them?? Or can the: >

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread Dave S
On Wednesday, June 6, 2018 at 1:48:48 PM UTC-7, b.l. masters wrote: > > So by "auth.register() itself handles the form processing, automatic > login, and redirect": Do you mean, that these functions are applied in the > pre-processing (as you also mention), so I can't alter them?? Or can the:

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread b.l. masters
So by "auth.register() itself handles the form processing, automatic login, and redirect": Do you mean, that these functions are applied in the pre-processing (as you also mention), so I can't alter them?? Or can the: auth.settings.login_after_registration,

[web2py] Scheduler error using python3.6 and psycopg2

2018-06-06 Thread Bart
For a new application, i have installed web2py 2.16.1 under python 3.6 and using psycopg2 2.7.4 for postgresql access. Everything is working okay, except the web2py scheduler. After successfull execution of the first task, the scheduler gives an error in the send_heartbeat function. The task

[web2py] Re: Field represent not working in rows.render

2018-06-06 Thread kakella
I was using web2py 2.14.6 on python 2.6.6 and upgrading to the latest version of web2py and python 2.7 seems to resolve the issue. Thank you. On Tuesday, June 5, 2018 at 10:21:51 AM UTC-4, Anthony wrote: > > Please show the full traceback. > > On Tuesday, June 5, 2018 at 9:52:52 AM UTC-4,

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread Anthony
> > def index(): > #T.set_current_languages('zh-cn') > form=auth.register() > if form.process().accepted: > userID= form.vars.id > # assign user to group and appropriate services > user_group_assignment(userID) > # log user in and redirect to accounts

[web2py] Re: 'auth_user' not recognized in IS_IN_DB validator

2018-06-06 Thread b.l. masters
I have defined the auth_table. And it does have username=True But actually this makes me belatedly think, the issue could be related to the various ways I am attempting to get the custom table to work with registration, and the multiple db changes that are occurring as I play around. So I

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread b.l. masters
In terms of UI, at the [home]/index.html and the .../default/user/register are both displaying the form correctly. It includes: - username - password - confirm password - Invite Code The workflow for both should be: - load form in view - user enters info and hits return - user is automatically

[web2py] Re: Custom form with select boxes set selected from a variable in a loop

2018-06-06 Thread Anthony
The problem is that you are passing the same OPTION objects to SELECT each time, and when you set the "value" attribute of SELECT, it *mutates* the OPTION objects. So, the final pass through the loop sets the OPTION objects, which appear in each of the SELECT objects. Instead, you should

[web2py] Re: requires_verification = False not working with custom auth table

2018-06-06 Thread Anthony
The Auth settings should work the same in either case. Please show your exact code (model, controller, view) and describe the exact workflow (i.e., exactly what you do and see in the UI) in both cases. Also, note that if you just want to change the visibility and/or validators of particular

[web2py] Re: 'auth_user' not recognized in IS_IN_DB validator

2018-06-06 Thread Anthony
I notice in another thread you indicated you have a custom auth_user table. Presumably you either have not defined the auth_user table at this point in the code, or you have named it something else. Anthony On Tuesday, June 5, 2018 at 3:38:40 PM UTC-4, b.l. masters wrote: > > Hi > > I am using

[web2py] Re: sending html emails.... bug ...

2018-06-06 Thread Leonel Câmara
De nada :) -- 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"

[web2py] Custom form with select boxes set selected from a variable in a loop

2018-06-06 Thread Ischa Guns
Hello, I am trying to make a custom form with select boxes. I am using the SELECT helper to create the select boxes. I have a problem with setting the selected value. I have created the following example. def test_select(): users = [('0', 'None'), ('1', 'John'),

[web2py] Re: Using @cache.action with Redis takes 10 seconds to return a simple HTTP 503 or 404

2018-06-06 Thread Lisandro
Thank you for your fast answer Anthony! You are right, the problem is fixed in master. I applied those changes and the problem was solved. Thank you very much! El miércoles, 6 de junio de 2018, 10:44:42 (UTC-3), Anthony escribió: > > I believe this has been fixed in master: >

[web2py] Re: Using @cache.action with Redis takes 10 seconds to return a simple HTTP 503 or 404

2018-06-06 Thread Anthony
I believe this has been fixed in master: https://github.com/web2py/web2py/commit/ea5ea6a30759a2c825f23381540dc396cbc475b7. Anthony On Wednesday, June 6, 2018 at 9:16:57 AM UTC-4, Lisandro wrote: > > Quick update: *apparently the problem doesn't happen using > RedisCache(with_lock=False, ...)*

[web2py] Re: passing variables to plugin_layout view - plugin_layouts\layouts\

2018-06-06 Thread Anthony
Keep in mind that the layout is executed for every page (that extends it), so only defining that variable in the dashboard function will not work, as it will remain undefined otherwise. Declaring the variable as global within the dashboard function has no effect because each HTTP request

[web2py] Re: Using @cache.action with Redis takes 10 seconds to return a simple HTTP 503 or 404

2018-06-06 Thread Lisandro
Quick update: *apparently the problem doesn't happen using RedisCache(with_lock=False, ...)* Should this be considered a bug or is it the expected behaviour? I would like to keep with_lock=True but avoid that 10 second delay when a function raises HTTP 503 or 404. The issue with that delay is

[web2py] Using @cache.action with Redis takes 10 seconds to return a simple HTTP 503 or 404

2018-06-06 Thread Lisandro
Hi there! I recently upgraded my production environment to web2py 2.16.1, and I'm facing an old issue that was apparently solved. In my applications I use @cache.action to cache public pages, and as I use Redis for cache, I use it like this: @cache.action(time_expire=300,

Re: [web2py] Re: sending html emails.... bug ...

2018-06-06 Thread António Ramos
It works with gmail now Leonel Obrigado :) 2018-06-06 12:20 GMT+01:00 Leonel Câmara : > The path is wrong or not absolute, use something like > mail.Attachment(os.path.join(request.folder, > 'static/images/pending.png')) > > -- > Resources: > - http://web2py.com > - http://web2py.com/book

[web2py] Re: sending html emails.... bug ...

2018-06-06 Thread Leonel Câmara
The path is wrong or not absolute, use something like mail.Attachment(os.path.join(request.folder, 'static/images/pending.png')) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: 'auth_user' not recognized in IS_IN_DB validator

2018-06-06 Thread Leonel Câmara
Also does your define_tables call have a username=True keyword arg? -- 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

[web2py] Re: 'auth_user' not recognized in IS_IN_DB validator

2018-06-06 Thread Leonel Câmara
Is this running before auth.define_tables? -- 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

[web2py] Re: passing variables to plugin_layout view - plugin_layouts\layouts\

2018-06-06 Thread Rahul
Hi Anthony, Thanks for getting back - I understood your point. I included it in one of my functions and called it where it worked. for example I called it in dashboard() function which is used to show the dashboard and is the first landing page of my application. However now whenever

Re: [web2py] Re: sending html emails.... bug ...

2018-06-06 Thread António Ramos
i cannot get "'fileit/static/images/pending.png' " working. I get [Errno 2] No such file or directory: 'fileit/static/images/pending.png'Versão web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 Python Python 2.7.5: /home/ramstein74/webapps/new2py/bin/uwsgi (prefix: /usr)Traceback 1. 2.

Re: [web2py] Re: ADD TO CART BUTTON

2018-06-06 Thread elisha bere
ok thank you sir ... i am still new to web2py On 5 June 2018 at 16:17, Anthony wrote: > db.define_table('products', >> Field('product_name'), >> Field('current_price', 'float'), >> Field('image', 'upload'), >> Field('description', type='text'), >>