[web2py] Re: User_agent is NoneType error

2017-11-20 Thread DaneW
Thanks. I have now upgraded to 2.16.1 but I'm afraid the problem is still there. The traceback is slightly different - File "/home/appgov/web2py/gluon/globals.py", line 340, in user_agent user_agent = user_agent_parser.detect(http_user_agent) TypeError: argument of type 'NoneType' is not

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

2017-11-20 Thread Ian W. Scott
I'm still wondering if anyone can help with this. I found a minor error in the second member of the routes_in tuple (the period shouldn't be escaped). But it's still not working for me. I used re.sub to confirm that the second member *should be* outputting the right string. So far I'm just

[web2py] Re: Import application from staging to production server

2017-11-20 Thread Anthony
On Sunday, November 19, 2017 at 10:03:12 PM UTC-5, Peter wrote: > > > I don't understand the 'local_import' in this line > > pygal = local_import('pygal') >> >> > Can't find it in the documentation for web2py, pygal or searching python > local_import... > local_import was deprecated after

[web2py] Re: threading Lock

2017-11-20 Thread Leonel Câmara
Pretty much. Note that usually you can refer to the library documentation to know which parts are threadsafe. For instance matplotlib has an object-oriented interface that is thread safe as it is explained here: https://matplotlib.org/faq/howto_faq.html#matplotlib-in-a-web-application-server

[web2py] Re: How to insert data into Database?

2017-11-20 Thread Anthony
Have you defined the blog1 table anywhere? If you have, the code looks OK -- what are you observing, and what do you expect instead? Anthony On Monday, November 20, 2017 at 4:46:07 PM UTC-5, Sandeep Patel wrote: > > I want to take data from the user using my HTML template and insert that >

[web2py] How to insert data into Database?

2017-11-20 Thread Sandeep Patel
I want to take data from the user using my HTML template and insert that data into my database without using SQLFROM and FROM in my controller file. can I do it? Actually, I am new in web2py, please give me direction. Here file #model file from gluon import DAL, Field mysql =

[web2py] Fwd: Us congress hearing of maan alsaan Money laundry قضية الكونغجرس لغسيل الأموال للمليادير معن الصانع

2017-11-20 Thread mike a
YouTube videos of U.S. Congress money laundering hearing of Saudi Billionaire " Maan Al sanea" with *bank of America* and The owner of Saad Hospital and Schools in the Eastern Province in *Saudi Arabia* and the Chairman of the Board of Directors of Awal Bank in *Bahrain*

[web2py] Re: restful service + auth on same application/ different controllers = gives Not authorized message

2017-11-20 Thread Val K
Hi, you can use requests.Session: #in default session = requests.Session() url_login = 'http:///api/login.json' #requests.packages.urllib3.disable_warnings() # - uncomment if you use a self-signed cert over https r = session.get(url_login, verify=True) #set verify=False if you use a

[web2py] error: 'No module named sanitizer' after upgrading to 2.16.1

2017-11-20 Thread Ton Sjerps
After upgrading from 2.15.4 it gave the ticket below. Unfortunately putting it back to the previous or an even older version did not solve the problem. Searching the web it seems to be related to python libs *html5lib *and *bleach* reinstalling or updating them with 'pip install -U bleach' does

[web2py] Retrieve database item using print vs return

2017-11-20 Thread Maurice Waka
In my previous question: [web2py] How to get the last DB Field data : I got some good response. But my issue still persists. My code:

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

2017-11-20 Thread Ian W. Scott
Yes, that's right. I'm getting a 404 on each file with the added version string, which must mean that the routes.py isn't pointing the browser successfully to the real file (without the version string in the name. For clarity's sake, here's the contents of my routes.py with the one syntax

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

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 6:02:38 PM UTC-8, Ian W. Scott wrote: > > Yes, that's right. I'm getting a 404 on each file with the added version > string, which must mean that the routes.py isn't pointing the browser > successfully to the real file (without the version string in the name. >

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

2017-11-20 Thread Ian W. Scott
I'm not getting web2py's 404 page because it's not the controller's page that isn't found. It's the stylesheet. So when I view all of the file requests in Chrome's dev tools (network tab) I see that the request for the stylesheet has returned 404. The requested URL was:

[web2py] Re: restful service + auth on same application/ different controllers = gives Not authorized message

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 3:08:56 PM UTC-8, Val K wrote: > > > Hi, you can use requests.Session: > > #in default > session = requests.Session() > session is an already-defined global. > url_login = 'http:///api/login.json' > Shouldn't you be using the URL helper? For my setup,

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

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 9:04:27 AM UTC-8, Ian W. Scott wrote: > > I'm still wondering if anyone can help with this. I found a minor error in > the second member of the routes_in tuple (the period shouldn't be escaped). > But it's still not working for me. I used re.sub to confirm that

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

2017-11-20 Thread Ian W. Scott
I saw it the other day, so I can find it again. I just didn't want to be bothered manually updating version numbers all the time. So I was looking to build something more automatic. Oh well. Thanks for your help, anyway. Ian On Monday, November 20, 2017 at 11:02:56 PM UTC-5, Dave S wrote: > >

[web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 7:41:55 PM UTC-8, Maurice Waka wrote: > > In my previous question: [web2py] How to get the last DB Field data : > I got some good response. But my issue still persists. > My code: > > >

Re: [web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 8:50:51 PM UTC-8, Maurice Waka wrote: > > HI this is my code: > Do you really have a lot of stuff *outside* of the tags? Or are you showing us several separate files? I'm not sure how to tie this all together. /dps > {{for q in quizes:}} > {{quiz =

[web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 9:22:43 PM UTC-8, Dave S wrote: > > > > On Monday, November 20, 2017 at 8:15:55 PM UTC-8, Dave S wrote: >> >> [...] But what is the blue bubble above the Send button? It says "God >> is love" ... are you putting the result in the wrong place? >> >> I see the

Re: [web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Maurice Waka
You mean a screen shot of before input, and after the input? On 21 Nov 2017 8:59 AM, "Dave S" wrote: > > > On Monday, November 20, 2017 at 9:49:41 PM UTC-8, Maurice Waka wrote: >> >> That's the first input message I typed. The return message in the white >> bubble should

Re: [web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 10:05:47 PM UTC-8, Maurice Waka wrote: > > You mean a screen shot of before input, and after the input? > I mean the top lines of (posted at 8:50 my time (Los Angeles area, UTC-8) ) It's a

Re: [web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Maurice Waka
Hi This is my code: Chat Bot Original SEND * { margin: 0px; user-select: none; -webkit-user-select: none; -moz-user-select: none; } body { margin: 0px;

[web2py] Re: restful service + auth on same application/ different controllers = gives Not authorized message

2017-11-20 Thread Dave S
On Monday, November 13, 2017 at 6:14:00 AM UTC-8, Leandro Sebastian Salgueiro wrote: > > HI, > > I have two controllers on the same app: > > TestApp > | > |---default.py > |---api.py > > api is a restful service that will call other services. For security > reasons I would like that all call

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

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 7:04:00 PM UTC-8, Ian W. Scott wrote: > > I'm not getting web2py's 404 page because it's not the controller's page > that isn't found. It's the stylesheet. > Yeah, I just was about to admit I didn't try messing with anything from static. > So when I view

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

2017-11-20 Thread Dave S
u On Friday, November 17, 2017 at 7:12:58 AM UTC-8, Ian W. Scott wrote: > > 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: Retrieve database item using print vs return

2017-11-20 Thread Maurice Waka
HI this is my code: {{for q in quizes:}} {{quiz = q.message}} {{pass}} Chat Bot Original SEND * { margin: 0px; user-select: none; -webkit-user-select: none; -moz-user-select:

[web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 8:15:55 PM UTC-8, Dave S wrote: > > [...] But what is the blue bubble above the Send button? It says "God > is love" ... are you putting the result in the wrong place? > > I see the sololearn example page puts my input into blue bubbles that are

Re: [web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Maurice Waka
That's the first input message I typed. The return message in the white bubble should also be the same as the one in the bubble blue. Am just testing to see that I pick the right input from my modules. On 21 Nov 2017 8:22 AM, "Dave S" wrote: On Monday, November 20, 2017

Re: [web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Maurice Waka
Let me start a new app and build from there. Then I'll let you know. There could be something I insert somewhere that I don't know. Regards On 21 Nov 2017 9:05 AM, "Maurice Waka" wrote: > You mean a screen shot of before input, and after the input? > > On 21 Nov 2017 8:59

Re: [web2py] Re: Retrieve database item using print vs return

2017-11-20 Thread Dave S
On Monday, November 20, 2017 at 9:49:41 PM UTC-8, Maurice Waka wrote: > > That's the first input message I typed. The return message in the white > bubble should also be the same as the one in the bubble blue. Am just > testing to see that I pick the right input from my modules. > > In that

[web2py] Re: restful service + auth on same application/ different controllers = gives Not authorized message

2017-11-20 Thread Val K
As I see Leo uses requestS module, don't confuse with web2py request object. Yes it's no good idea to use 'session' as name -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

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

2017-11-20 Thread Michele Comitini
Daniel, The AWS certificate manager gives you certificates that you can use on a ELB. So you can put an ELB in front of your EC2 box and use the certificate(s) from there. mic 2017-11-20 2:29 GMT+01:00 Daniel Dos Santos Guilhermino < danielguilherm...@gmail.com>: > HI Dave, > > Many thanks,

[web2py] MIGRATE UPLOADS FROM SQLITE TO POSTGRESQL

2017-11-20 Thread Áureo Dias Neto
I migrated my data from sqlite to postgres, but I have file uploads on disk used in my database. I want to send them from my "disk" to my base in postgresql, to use it in a "blob (bytea, actually)" field. Thank you in advance, family. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: threading Lock

2017-11-20 Thread Pierre
from recent forum threads elements i assume the following 'macro-situation': (0) python libraries selected for a project should be thread-safe (1) user uses python libaries at his own risk (there 's no mean to verify it's thread-safe) (2) in order to minimize risks user should put a lock