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

2018-06-08 Thread António Ramos
Gmail in mobile works better. It does not show the attached photos at the bottom. Regards 2018-06-07 18:31 GMT+01:00 Leonel Câmara : > Nothing you can do about that Ramos. It depends on the email client. You > could use online images instead of sending them with the email but then you > will run

[web2py] Re: s3fs uploadfs error saying file name cannot be string - must be unicode

2018-06-08 Thread Leonel Câmara
Well the error is pretty explicit. Convert path to unicode. Instead of: path='attachments.files.ad112b05475e6e3e.4c61632045766...e7669746174696f6e2028456e676c697368292e706466.pdf' Use: path=u'attachments.files.ad112b05475e6e3e.4c61632045766...e7669746174696f6e2028456e676c697368292e706466.pdf'

[web2py] Re: Getting Error ModuleNotFoundError: No module named 'urllib2'

2018-06-08 Thread Leonel Câmara
Suhas can you try these changes: https://github.com/web2py/web2py/pull/1944/files > -- 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

[web2py] Re: LDAP Authentication never work

2018-06-08 Thread Leonel Câmara
Note that your function is decorated with @auth.requires_login() However you only change the authentication method to LDAP inside that same function, so before the function runs it will only have the regular login and will require it. You need to do that stuff before the controller function r

Re: [web2py] Re: LDAP Authentication never work

2018-06-08 Thread Suhas Jadhav
Are you saying i should do as below? It did not work for me. from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.actions_disabled=['register','change_password','request_reset_password','retrieve_username','profile'] auth.settings.remember_me_form = False auth.settings.login_

[web2py] Re: s3fs uploadfs error saying file name cannot be string - must be unicode

2018-06-08 Thread b00m_chef
I have upgraded to the master branch on github, and here is the new error: Ticket ID 184.67.247.98.2018-06-08.17-44-04.323a9bf9-4ee3-4150-9c1c-bacc7b84e0df coercing to Unicode: need string or buffer, tuple foundVersion web2py™ Version 2.16.1-stable+timestamp.2018.05.24.15.00.45Traceback 1. 2.

[web2py] Masking external url

2018-06-08 Thread e27gis
Hello, I have a web2py portal that has several applications, some of them are just a redirection to external urls. I would like to mask these urls (hide the true external url to the users) as if they are pure web2py applications, and also make impossible for the users so paste directly these l

[web2py] Am I be able to use file with Rdata extension as my database?

2018-06-08 Thread yifan li
Hi everyone, I'm new to Web2py. I have a project that I need to use a dataset that has been trained saved as 'train.Rdata' and some R code to make prediction. I have found that I can use rpy2 to embedded R code into python. But, is there any way would you recommended for me to use Rdata in web2

[web2py] Re: s3fs uploadfs error saying file name cannot be string - must be unicode

2018-06-08 Thread Leonel Câmara
Again, your new error is pretty explicit boto was expecting a string in your access_key and found a tuple there. You probably used a tuple with your key and secret in aws_access_key instead of just the key. The secret should go in aws_secret_key. -- Resources: - http://web2py.com - http://web2

[web2py] Re: Masking external url

2018-06-08 Thread Dave S
On Friday, June 8, 2018 at 12:22:38 PM UTC-7, e27...@gmail.com wrote: > > Hello, > > I have a web2py portal that has several applications, some of them are > just a redirection to external urls. > > I would like to mask these urls (hide the true external url to the users) > as if they are pure

[web2py] Re: s3fs uploadfs error saying file name cannot be string - must be unicode

2018-06-08 Thread watr
The solution was in the code I posted originally. I had commas at the declaration of the public and private key. After removing the commas I can now upload. *Before:* bucket = "pobook", region = 'ca-central-1', aws_akey = "##", aws_skey = "" *After:* bucket =

[web2py] DAL with UploadFS = s3 Not working with Delete and Download

2018-06-08 Thread watr
Here is my code: from fs_s3 import S3FS import datetime bucket = "pobook" region = 'ca-central-1' aws_akey = "##" aws_skey = "" myfs = S3FS( bucket, aws_access_key_id=aws_akey, aws_secret_access_key=aws_skey, regi

[web2py] Classes: Iteration of Row Objects & Updating

2018-06-08 Thread Mark Billion
Ive checked the docs and am sure I am missing it, but can someone please confirm or deny: If I iterate a row class attribute via another class method, updates applied by that method will will update the underlying row attribute? For example: __init__: self.dbobj = db(db.foo.bar>0).select(

[web2py] Re: DAL with UploadFS = s3 Not working with Delete and Download

2018-06-08 Thread watr
I am currently using the boto3 library to manipulate the s3 via: import boto3 bucket = 'pobook' region = 'ca-central-1' aws_akey = '' aws_skey = '##' myfs = S3FS( bucket, aws_access_key_id=aws_akey, aws_secret_ac

[web2py] Catch form submission and switch value of a form field

2018-06-08 Thread watr
Is it possible to catch a form submission before it is processed into the DB and switch a value in a form field? -- 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 Issue

Re: [web2py] Re: LDAP Authentication never work

2018-06-08 Thread 黄祥
pls try (not tested) *models/db.py* from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods.append(ldap_auth( mode='ad', server='ldaps://chexadcexp001.expeso.com:636',base_dn='ou=Service Accounts,dc=sea,dc=corp,dc=com') ) auth.settings.login_methods = [

[web2py] Re: Catch form submission and switch value of a form field

2018-06-08 Thread 黄祥
perhaps you can use onvalidation to switch it's value in a form field ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

[web2py] Re: certbot vs web2py -- geoip import break

2018-06-08 Thread Dave S
On Tuesday, May 8, 2018 at 10:42:51 PM UTC-7, Dave S wrote: > > > > On Friday, May 4, 2018 at 3:45:25 PM UTC-7, Dave S wrote: >> >> Here's a wierd one: >> >> AWS Linux, nginx, uwsgi, web2py 2.15.4, very stable. >> >> I use certbot --nginx to update my certs (yes, Let's Encrypt), which >> works

[web2py] include python libraries that needed in web2py app to distribute to another

2018-06-08 Thread 黄祥
*ref:* https://groups.google.com/forum/#!newtopic/web2py/web2py/_lNJg6XLl4c *question:* 1. which folder that must be included in app modules/ (e.g. ~/web2py/applications/init/modules) folder? e.g. $ ls -l ~/miniconda3/envs/python2 drwxr-xr-x 42 sugizo staff 1428 May 21 07:28 bin drwxr-xr-x 19

[web2py] Re: Classes: Iteration of Row Objects & Updating

2018-06-08 Thread Anthony
On Friday, June 8, 2018 at 5:49:07 PM UTC-4, Mark Billion wrote: > > Ive checked the docs and am sure I am missing it, but can someone please > confirm or deny: If I iterate a row class attribute via another class > method, updates applied by that method will will update the underlying row > att