[web2py] Re: scheduler can't normal run my script

2017-11-17 Thread yytrying
thank you for your answer ,it run normal def cve(): try: try: url= 'http://cve.scap.org.cn/cve_list.php?action=recent' rea = requests.get(url) rea.encoding = 'utf-8' html = BeautifulSoup(rea.text,'html.parser') a= html.find('di

[web2py] Re: scheduler can't normal run my script

2017-11-17 Thread yytrying
thank for you answer i use python G:\\web2py\\web2py.py -K yj:sss -X -a '1' -i 0.0.0.0 -p 8000 & to run my app,can you give me a example ? i understand the script,but i don't know how to use it in my app and when i use scheduler it auto use threading create so many task, i want to control it's

[web2py] Re: JWT questions

2017-11-17 Thread Dave S
Ooops, my browser didn't show me this first attempt succeeded. 2nd attempt has the tags; please go there. -d On Friday, November 17, 2017 at 10:14:20 PM UTC-8, Dave S wrote: > > > Between the docstrings in gluon/tools.py and this thread from 15 months > ago, > https://groups.google.com/d/topi

[web2py] JWT questions

2017-11-17 Thread Dave S
Between the docstrings in gluon/tools.py and this thread from 15 months ago, https://groups.google.com/d/topic/web2py/p9HE6pnf-VE/discussion> I finally tried and succeeded with doing a JWT test. Thanks, Niphlod! As in the thread, I used the auth = Auth(..., jwt = {} ) technique. The AuthJWT

[web2py] JWT questions

2017-11-17 Thread Dave S
Between the docstrings in gluon/tools.py and this thread from 15 months ago, https://groups.google.com/d/topic/web2py/p9HE6pnf-VE/discussion> I finally tried and succeeded with doing a JWT test. Thanks, Niphlod! As in the thread, I used the auth = Auth(..., jwt = {} ) technique. The AuthJWT

[web2py] Pydal upload compatibility with pyfilesystem

2017-11-17 Thread Yangbo Xu
Hello, I have a question regarding how Pydal can accept remote filesystem thru pyfilesystem. According to the web2py documentation http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor I need to put uploadfs = # pyfilesystem object in field defin

[web2py] Re: threading Lock

2017-11-17 Thread Dave S
On Friday, November 17, 2017 at 4:18:35 PM UTC-8, Dave S wrote: > > > > On Friday, November 17, 2017 at 1:29:55 PM UTC-8, Pierre wrote: >> >> No this won't work..I don't know how to instantiate a lock that will >> act as a global variable. this is an enigma. tried to read this: >> http://mar

[web2py] Re: SSL certificate on web2py (aws ec2 + Nginx + uwsgi)

2017-11-17 Thread Dave S
On Friday, November 17, 2017 at 4:16:50 PM UTC-8, Daniel Dos Santos Guilhermino wrote: > > Thanks Dave! > > I'll search about let's encrypt, maybe help me. > > Best regards. > > > Daniel Guilhermino > I used certbot-auto from certbot.org, which is a sub-organization of EFF and Let's Encrypt.

[web2py] Re: threading Lock

2017-11-17 Thread Dave S
On Friday, November 17, 2017 at 1:29:55 PM UTC-8, Pierre wrote: > > No this won't work..I don't know how to instantiate a lock that will > act as a global variable. this is an enigma. tried to read this: > http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html > but it's t

[web2py] Re: SSL certificate on web2py (aws ec2 + Nginx + uwsgi)

2017-11-17 Thread Daniel Dos Santos Guilhermino
Thanks Dave! I'll search about let's encrypt, maybe help me. Best regards. Daniel Guilhermino -- 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 re

Re: [web2py] Re: Let's Encrypt renewals, Rocket, and nginx

2017-11-17 Thread Dave S
On Friday, November 17, 2017 at 9:56:57 AM UTC-8, Junior Phanter wrote: > > It is linux? Try change SELinux config. > I didn't have to do anything with SELinux config with the previous 2 renewals or the original signup. I'm not sure what tools AWS provides for that, either. /dps -- Resour

Re: [web2py] Logger issue

2017-11-17 Thread Dave S
On Wednesday, November 15, 2017 at 10:38:09 AM UTC-8, Alex wrote: > > I've got a similar problem. I have a model file where I initialize the > logger: > What did you find missing in using logging.conf? /dps > import logging, logging.handlers > > def get_configured_logger(name): > logge

[web2py] Re: SSL certificate on web2py (aws ec2 + Nginx + uwsgi)

2017-11-17 Thread Dave S
On Friday, November 17, 2017 at 3:17:39 AM UTC-8, Daniel Dos Santos Guilhermino wrote: > > Hi everybody, > > I used the script setup-web2py-nginx-uwsgi to install web2py on Amazon > ec2, but I want to use the Amazon Certificate Manager for my domains, it's > possible? > > I did all the setup o

[web2py] Re: list:string field length

2017-11-17 Thread Anthony
On Friday, November 17, 2017 at 3:53:02 PM UTC-5, Donald McClymont wrote: > > I don’t think you can set this but not sure why you would want to. > However beware if testing the length of the field as I think if you only > have 1 item in the list then this is a string and you get the number of >

[web2py] Re: list:string field length

2017-11-17 Thread Anthony
On Friday, November 17, 2017 at 10:32:21 AM UTC-5, Yoel Benitez Fonseca wrote: > > h! > > I always wanted to ask: According the online book, it is recommended > to explicit set the length of "string", "password" or "upload", but > what about list:string ? > I don't think the "length" attribu

Re: [web2py] Re: How to get teh last DB Field data

2017-11-17 Thread Maurice Waka
Thanks! I did exact;y what you said. It worked so well without the js. And am able to get the lest field item posted. Any idea why the js code below does not work?. Because once I use it, that's when i don't get the last posted message.I used the latest web2py. Regards $(function(){ va

[web2py] Re: threading Lock

2017-11-17 Thread Pierre
No this won't work..I don't know how to instantiate a lock that will act as a global variable. this is an enigma. tried to read this: http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html but it's too smart for me.what i want is '*a lock for humans*'like i

[web2py] Re: Web2py and machine learning - scikit-learn

2017-11-17 Thread Pierre
found this related to locking : https://redis.io/topics/distlock topic is very hermetic so if someone successfully implemented a lock in the production context of a web application i would really appreciate he shares his esoteric knowledge with us: 'the ignorants' -- Resources: - http://web2py.

[web2py] Re: list:string field length

2017-11-17 Thread Pierre
if this is what you want, you can control | limit the length of a list:string field using a custom validator. this is documented in the book. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web

[web2py] list:string field length

2017-11-17 Thread Donald McClymont
I don’t think you can set this but not sure why you would want to. However beware if testing the length of the field as I think if you only have 1 item in the list then this is a string and you get the number of chars in the string. While if you have more than 1 you get the length of the list.

[web2py] Re: Registration & Login through Google

2017-11-17 Thread Donald McClymont
You could also consider python social auth https://github.com/DonaldMcC/w2p-social-auth this does work with google and should be reasonably easy to setup however at present it only does the authentication it doesn’t populate email addresses and so on as that is supposed to be done subsequently

[web2py] Re: User_agent is NoneType error

2017-11-17 Thread Leonel Câmara
Can you upgrade to the latest version, restart, and check if this still happens? If it does, please file an issue in github explaining how to reproduce. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

Re: [web2py] Re: Let's Encrypt renewals, Rocket, and nginx

2017-11-17 Thread Junior Phanter
It is linux? Try change SELinux config. -- 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

[web2py] Re: Registration & Login through Google

2017-11-17 Thread pbreit
Yep, I will report back my findings. Google authentication has become exceedingly widespread in the business SaaS world. It makes it so much easier for IT admins to control access to tools employees use. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] Re: Registration & Login through Google

2017-11-17 Thread Leonel Câmara
I don't think anything about oauth2 is straightforward, but I think it's worth the time investment if you only want to allow google logins (you don't need other social logins) since it will only take you a couple of days and then you don't need to pay third parties such as janrain. -- Resource

[web2py] list:string field length

2017-11-17 Thread Yoel Benitez Fonseca
h! I always wanted to ask: According the online book, it is recommended to explicit set the length of "string", "password" or "upload", but what about list:string ? -- Msc. Yoel Benítez Fonseca -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2

[web2py] Re: Routes.py to filter out file version numbers

2017-11-17 Thread Ian W. Scott
I should add that one reason I'm having trouble debugging is because I'm not sure how to test the output of the rewrite. Is there any way to see exactly what the rule is going to output, given a particular filename? On Friday, November 17, 2017 at 10:12:58 AM UTC-5, Ian W. Scott wrote: > > Hi th

Re: [web2py] Re: How to get teh last DB Field data

2017-11-17 Thread Anthony
On Wednesday, November 15, 2017 at 9:46:34 AM UTC-5, Maurice Waka wrote: > > *controller* > @auth.requires_login() > def view_searches(): > form = SQLFORM(Post) > if form.process().accepted: > #pass > response.flash = 'done' > if request.vars.message: > db.post.i

[web2py] Re: web2py 2.16.1 is OUT

2017-11-17 Thread Daniel Vogel

[web2py] Routes.py to filter out file version numbers

2017-11-17 Thread Ian W. Scott
Hi there. I'm dynamically adding version numbers to the filenames for static assets like css, js, and image files. (These version numbers aren't actually in the filenames. They're just added to the url in the and

Re: [web2py] Re: How to get teh last DB Field data

2017-11-17 Thread Anthony
On Wednesday, November 15, 2017 at 9:51:22 AM UTC-5, Maurice Waka wrote: > > About db refresh, > when i go to the database administration page in the app, and open the > post.db page, i have to manually refresh the page to see the latest > inserted value which does not match with the returned val

[web2py] SSL certificate on web2py (aws ec2 + Nginx + uwsgi)

2017-11-17 Thread Daniel Dos Santos Guilhermino
Hi everybody, I used the script setup-web2py-nginx-uwsgi to install web2py on Amazon ec2, but I want to use the Amazon Certificate Manager for my domains, it's possible? I did all the setup on Amazon... but still doesnt work. *Thanks in advance.* Best regards, Daniel Guilhermino The impossib

[web2py] User_agent is NoneType error

2017-11-17 Thread DaneW
I have recently started to get regular tickets for TypeError: argument of type 'NoneType' is not iterable on user_agent.is_mobile = 'Mobile' in http_user_agent 1. 2. 3. 4. 5. 6. 7. 8. Traceback (most recent call last): File "/home/appgov/web2py/gluon/restricted.py", line 219, in restricted