[web2py] Re: ProgrammingError: column "worker_stats__tmp" is of type json but expression is of type text

2016-08-26 Thread Ben Lawrence
Thanks, I must have got the sequence wrong. On Thursday, August 25, 2016 at 12:05:38 PM UTC-7, Niphlod wrote: > > if you get any error with __tmp is because you didn't drop tables on the > backend AND .table files before hitting the app with migrate=True. > > On Thursday, August 25, 2016 at 6:53:

[web2py] Re: Validate user account without login

2016-08-26 Thread Antonio Salazar
Just found it in the manual . It's done with: user = auth.login_bare(username, password) or in my case: login_is_valid = bool(auth.login_bare(username, password)) On Friday, August 26, 2016 at 5:40:59 PM UTC

[web2py] Validate user account without login

2016-08-26 Thread Antonio Salazar
I have a working application which does LDAP authentication exclusively. I'm adding a a web service that generates an access token if the user and password passed to it by JSON are valid. I'm not sure about how to validate the account against LDAP inside the web service, but I'd really like to

[web2py] uploadfs vs uploadfolder

2016-08-26 Thread admin
This works great when using SQLFORM: import fs.s3fs myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_key, aws_secret_key) db.define_table('image',Field( 'image','upload',uploadfs = myfs)) however, when I run this : db.image.insert(image=db.image.image.store(BytesIO(blob, filename))) I get this er

[web2py] var to follow user around

2016-08-26 Thread Alex Glaros
user selects one of several organization IDs to work with. Instead of putting the ID in a dict that has to get passed around to every controller he goes to, is it safe/ok, to just keep the value in a session var? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (

[web2py] Re: storing blob field on s3

2016-08-26 Thread admin
This works fine for me: import fs.s3fs myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_key, aws_secret_key) db.define_table('image',Field('image','upload',uploadfs = myfs)) however, when I run this (which has worked in the past): db.image.insert(image=db.image.image.store(StringIO.StringIO(blob,

[web2py] web2py behind router (forwarding of IP Public to the IP LAN)

2016-08-26 Thread 黄祥
I've forwarded our Public IP which we get from our ISP on router (Mikrotik) to the Webserver Ngnix (IP LAN) with OS CentOS 6 (forwarding of IP Public to the IP LAN), but the result is not right. The port is 80 and 443. I used installation script (setup-web2py-nginx-uwsgi-centos64.sh). Is there a

[web2py] Re: logout don't kill session

2016-08-26 Thread Jose Eleudson Gurgel Queiroz
More information. I'm debunging with def user(): pdb.set_trace() #BREAKPOINT return dict(form=auth()) Accurs that auth.navbar log out link (http://localhost:8000/eadnotas/default/user/logout?_next=/eadnotas/default/index) do not activate the debug line. The new item in administrator

[web2py] Re: logout don't kill session

2016-08-26 Thread Jose Eleudson Gurgel Queiroz
More information. The auth.navbar generate this URL http://localhost:8000/eadnotas/default/user/logout?_next=/eadnotas/default/index that not logout the user. I create a new item in administrator menu with (T('Log Out'),URL('default','user',args='logout')==URL(),URL('default','user',args='log

[web2py] Re: I am trying to login from Phonegap app into my web2py app, what's wrong here?

2016-08-26 Thread Steve Joe
*db(db.auth_user.username == request.vars.username and db.auth_user.password == CRYPT(request.vars.password)).select()* This also doesn't work either. On Friday, August 26, 2016 at 7:30:41 PM UTC+5:30, Niphlod wrote: > > fortunately the password doesn't get stored in plain text on web2py :D You

[web2py] Re: I am trying to login from Phonegap app into my web2py app, what's wrong here?

2016-08-26 Thread Niphlod
fortunately the password doesn't get stored in plain text on web2py :D You need to apply CRYPT() before comparing. Read more about that on the book. On Friday, August 26, 2016 at 3:31:54 PM UTC+2, Steve Joe wrote: > > IN PHONEGAP: > > https://#someurl#.pythonanywhere.com/welcome/phonegap/login >

[web2py] I am trying to login from Phonegap app into my web2py app, what's wrong here?

2016-08-26 Thread Steve Joe
IN PHONEGAP: https://#someurl#.pythonanywhere.com/welcome/phonegap/login";> username: Password: IN WEB2PY: def login(): k="false" if db(db.auth_user.username == request.vars.username and db.auth_user.password == request.vars.password).select(): k="true"

Re: [web2py] Re: logout don't kill session

2016-08-26 Thread Eleudson Queiroz
Hi, Prof. Massimo, Sorry by may delay to response, I have a short vacation. I'm using the follow version of Web2Py: Production Server 2.14.6-stable+timestamp.2016.05.10.00.21.47 (Running on nginx/1.4.6, Python 2.7.6) Development Desktop 2.14.6-stable+timestamp.2016.05.10.00.21.47 (Running on Ro

[web2py] Re: web2py behind socks proxy

2016-08-26 Thread Saifuddin Rangwala
I meant to say: I tried searching and found a few threads where people tried attempting the same in the past but it is "not" very clear what was the solution. Apology for spam. On Friday, August 26, 2016 at 6:45:46 PM UTC+5:30, Saifuddin Rangwala wrote: > > Hi, > > In my environment, I have

[web2py] web2py behind socks proxy

2016-08-26 Thread Saifuddin Rangwala
Hi, In my environment, I have web2py running inside restricted network that doesn't have direct internet access. I have a socks proxy that can help with access to internet from web2py host. Is there a way to configure a global socks proxy for web2py, such that everything like emails, catpc

[web2py] question about db.files._before_delete.append()

2016-08-26 Thread António Ramos
Hello i have 3 tables entities, files and events. Files table has a _before_delete callback to delete all events of a file in table events before deleting the file. table events is to drop events for files and entities so i did not create a foreign key but instead created in entities and files tabl