[web2py] How to implement background task getting GPS data requested on demand by the web client

2016-04-13 Thread Georges Vidal
HI I work on a project based on Python and PCDUINO plateform. I would like to use web2py framework to simplify the web communication between the client and server. *The process to implement in a few words is :* *On the server side :* Define a python process that every 0.5 second asks the

[web2py] Background process

2016-04-13 Thread Georges Vidal
HI I work on a project based on Python and PCDUINO plateform. I would like to use web2py framework to simplify the web communication between the client and server. The process to implement in a few words is : On the server side : Define a python process that every 0.5 second asks the gpsd

Re: [web2py] Re: web2py 2.14.4 is OUT

2016-04-13 Thread Richard Vézina
I didn't have time to investigate though it won't start with : python web2py.py -S welcome -M But once it has been started with the launcher : python web2py.py It start with the previous command... To reproduce, unzip 2.14.4 and try the first command. Richard On Wed, Apr 13, 2016 at 5:31

[web2py] Re: Empty strings stored as null in database

2016-04-13 Thread Leonel Câmara
Ok I've fixed it: https://github.com/web2py/web2py/pull/1294 And now I hate you guys with a tremendous passion. It took me a huge amount of time for a fix that ended up being a oneliner. html.py is horrible, Cthulhu level horrible, it couldn't be harder to follow its execution flow if it had

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 4:44:27 PM UTC-7, Dave S wrote: > > > > On Wednesday, April 13, 2016 at 3:47:38 PM UTC-7, Alex Glaros wrote: >> >> that works as I expected,but didn't we not have to copy index.html to >> newfunc.html? >> >> we used to just use admin button to "create new view"

[web2py] Re: sequential requests

2016-04-13 Thread Jason Solack
Quick update on this... I ran the same test with nginx on aws and that works as expected... So I strongly suspect a setting or settings in Apache being the issue -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 3:47:38 PM UTC-7, Alex Glaros wrote: > > that works as I expected,but didn't we not have to copy index.html to > newfunc.html? > > we used to just use admin button to "create new view" and mast header code > was automatically included. I mean we had to have

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 3:47:38 PM UTC-7, Alex Glaros wrote: > > that works as I expected,but didn't we not have to copy index.html to > newfunc.html? > > we used to just use admin button to "create new view" and mast header code > was automatically included. I mean we had to have

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Alex Glaros
that works as I expected,but didn't we not have to copy index.html to newfunc.html? we used to just use admin button to "create new view" and mast header code was automatically included -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 3:30:07 PM UTC-7, Alex Glaros wrote: > > it works for me like that too but can you please try a new function not > named index.html? > > the reason I'm posting is because I get the same behaviour on two > different computers. > > much appreciated! > > Alex >

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Alex Glaros
it works for me like that too but can you please try a new function not named index.html? the reason I'm posting is because I get the same behaviour on two different computers. much appreciated! Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 2:47:56 PM UTC-7, Alex Glaros wrote: > > forgot to include that to create the new app, use the admin function: > > New simple application > > that's where I see that layout is missing header includers > > thanks > > Alex > I used the button to create mynewapp.

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Alex Glaros
forgot to include that to create the new app, use the admin function: New simple application that's where I see that layout is missing header includers thanks Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Scheduler not finding module

2016-04-13 Thread peter
I do have more than one python, but I thought the python the scheduler was using was the one specified in the RUN statement above, and DAEMON=python2.6 As I showed, python2.6 has dropbox installed. How could a scheduler task use a different python? This is useful to know. Thanks Peter --

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Alex Glaros
hi Dave I know it's in the sample but didn't it used to automatically populate when creating any new function besides index.html? Can you please try creating a new function besides index.html and see if the title/subtitle appear in view automatically (after adding them to the controller of

[web2py] Re: sequential requests

2016-04-13 Thread Jason Solack
No database. I took out all the model files. I am just iterating through some lists then sleeping for 5 seconds. -- 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

[web2py] Re: web2py 2.14.4 is OUT

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 1:41:12 PM UTC-7, Alex Glaros wrote: > > was this below left out of layout.html? I just see the word "include" > there but nothing to include > > {{block header}} > > > {{if response.title:}} > {{=response.title}} >

[web2py] Re: sequential requests

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 1:35:10 PM UTC-7, Jason Solack wrote: > > Hello all, > > I have set up a simple site on aws to test concurrent requests and it > appears i'm getting requests answered sequentially... > > https://52.207.216.107/ServerTest/default/index > > I essentially ran the

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 1:07:58 PM UTC-7, Alex Glaros wrote: > > Do we have to manually add this to each page now? > > {{block header}} > > > {{if response.title:}} > {{=response.title}} > {{=response.subtitle or ''}} > {{pass}} > >

Re: [web2py] Re: Slow TTFB debugging with Wing IDE

2016-04-13 Thread Max Slimmer
I'm doing that with sessions. I'm pretty sure this is something to do with the IDE. I'll keep investigating. On Fri, Apr 8, 2016 at 1:27 AM, Niphlod wrote: > just call session.forget(response). You can read from the session as you > like. > session.forget() isn't going to add

[web2py] Re: web2py 2.14.4 is OUT

2016-04-13 Thread Alex Glaros
was this below left out of layout.html? I just see the word "include" there but nothing to include {{block header}} {{if response.title:}} {{=response.title}} {{=response.subtitle or ''}} {{pass}} {{end}} thanks, Alex Glaros --

[web2py] sequential requests

2016-04-13 Thread Jason Solack
Hello all, I have set up a simple site on aws to test concurrent requests and it appears i'm getting requests answered sequentially... https://52.207.216.107/ServerTest/default/index I essentially ran the ubuntu setup script and tested it... i have upped the processes and threads in the

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Alex Glaros
Do have to manually add this to each page now? {{block header}} {{if response.title:}} {{=response.title}} {{=response.subtitle or ''}} {{pass}} {{end}} Is not included in layout.html -- Resources: - http://web2py.com -

[web2py] Re: web2py 2.14.4 is OUT

2016-04-13 Thread Raul Monares
I just did some tests. It still saves empty strings as null when using SQLFORM or CRUD and the string field has default=''. But when using db.table.insert the empty string is stored. On Tuesday, April 12, 2016 at 3:29:26 PM UTC-6, Massimo Di Pierro wrote: > > web2py 2.14.4 is out. > > It fixes

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Alex Glaros
forgot to state: response.title works in index file for me too please try again with a new function thanks Dave Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Dave S
On Wednesday, April 13, 2016 at 12:35:21 PM UTC-7, Alex Glaros wrote: > > Can someone please help me? This is a huge favor > > >- download the very latest Windows binary version from web2py.com >- create the simplest possible app with simplest possible view >- in controller for that

[web2py] Re: Empty strings stored as null in database

2016-04-13 Thread David Manns
This problem is still in 2.14.4. This use case suggests the problem is within form handling, nothing to do with database or adapter. David Manns On Monday, April 11, 2016 at 10:06:41 AM UTC-4, David Manns wrote: > > There is a similar problem with SQLFORM.factory. E.g: > >

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Alex Glaros
Can someone please help me? This is a huge favor - download the very latest Windows binary version from web2py.com - create the simplest possible app with simplest possible view - in controller for that view please add only this basic stuff response.title = T('Bye')

[web2py] Re: web2py 2.14.4 is OUT

2016-04-13 Thread Dave S
On Tuesday, April 12, 2016 at 2:29:26 PM UTC-7, Massimo Di Pierro wrote: > > web2py 2.14.4 is out. > > It fixes some a problem with CAS and some style issues with examples. > It also includes (and passes) a lot of new tests. > > Thanks to Richard Vezina, Simone and Leonel for doing most of the

[web2py] Re: How to integrate SendGrid in Web2py ?

2016-04-13 Thread Krishna Bavandlapally
Thank you Leonel Câmara. It worked. mail.settings.server = 'smtp.sendgrid.net:587' mail.settings.sender = xxx...@mail.com mail.settings.login = 'sendgrid_username:sendgrid_password' mail.settings.tls = True On Wednesday, 13 April 2016 14:29:16 UTC+5:30, Krishna Bavandlapally wrote: > > How to

[web2py] Re: What are the platforms for free web hosting of web2py apps?

2016-04-13 Thread Mirek Zvolský
I have web2py at forpsi. I use virtual machine Debian there (about 1.20 EUR / month). I have installed nginx (apt install nginx) and then web2py using scripts/ setup-web2py-nginx-uwsgi-ubuntu.sh But seems for systemd some files are missing. You can read more in ubuntu web2py

[web2py] What's my error here such that image resize gives error?

2016-04-13 Thread Stephen Duisberg
def changedp(): dpform=SQLFORM.factory(Field('img','upload', uploadfolder=os.path.join(request.folder,'uploads/')),table_name='info').process() if dpform.accepts(request.vars,session,formname="dpformm"): basewidth = 300 img =

[web2py] Re: Creating form in the view

2016-04-13 Thread Anthony
On Wednesday, April 13, 2016 at 9:46:32 AM UTC-4, rajjmatt...@gmail.com wrote: > > Another work around would be to do it this way in the controller probably. > form=FORM('Your > name:', INPUT(_name='name'), INPUT(_type='submit')). > That's no different from SQLFORM(db.mytable), but more

[web2py] xmlrpclib use_datetime=True has no effect on web2py side

2016-04-13 Thread Hrobjartur Thorsteinsson
When passing datetime.datetime objects to service.xmlrpc in web2py xmlrpc DateTime objects are not converted python datetime.datime, even when explicitly setting up a connection with use_datetime = True. s = xmlrpclib.ServerProxy("http://localhost:8000/masterdb/device_history/call/xmlrpc;,

[web2py] Re: How to integrate SendGrid in Web2py ?

2016-04-13 Thread Ron Chatterjee
On that note. Leonel, how do we create inbox using web2py that looks similar to outlook? So, when someone write a blog post and other replies or for chat application to say, we can use that outlook looking interface to present the data. Can someone reply to the mail we send with

[web2py] Excel like filter in grid

2016-04-13 Thread Gael Princivalle
Hello. I would like to make a grid with some drop down menus for filtering results. Is there already something that exist ? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Deploying Web2py on AWS Mobile Hub

2016-04-13 Thread Carl Hunter Roach
With AWS Mobile Hub supporting Python and deployment zip files for any libraries has anyone taken this route and have AWS Lambda backed by Web2py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Error: Permission denied to access property "document"

2016-04-13 Thread Niphlod
any "X-Frame-Options" header returned ? google around, there are tons of ready-baked solutions. On Tuesday, April 12, 2016 at 11:28:06 PM UTC+2, Nalab wrote: > > Hi > When trying to run pop-up window,I'm getting this error "Error: Permission > denied to access property "document"",, Anyone with

[web2py] Re: Scheduler not finding module

2016-04-13 Thread Niphlod
how many python(s) have you available ? it's possible that the inner process gets started with the default interpreter . BTW: those kind of issues are the reason behind virtual environments... On Wednesday, April 13, 2016 at 2:29:18 PM UTC+2, peter wrote: > > I have an issue with processes

[web2py] Re: Creating form in the view

2016-04-13 Thread rajjmatthur
Another work around would be to do it this way in the controller probably. form=FORM('Your name:', INPUT(_name='name'), INPUT(_type='submit')). But if I define the form in the book example as shown below, how do I pass form.vars back into that controller? Lets say I don't have a database for

Re: [web2py] Re: Odd error

2016-04-13 Thread Richard Vézina
Did you upgrade? If so, you most probably did it with root privileges... So the permission should probably come from there, been change at the upgrade time... On Wed, Apr 13, 2016 at 9:06 AM, Leonel Câmara wrote: > Was appadmin being accessed? It uses admin for

[web2py] Re: Odd error

2016-04-13 Thread Leonel Câmara
Was appadmin being accessed? It uses admin for authentication by default. -- 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

[web2py] Re: Odd error

2016-04-13 Thread Jason Solack
So when these errors were occurring i saw about 20 error tickets per minute being generated in the admin app. there was no traffic toward the admin app at the time, any idea why that would happen? On Wednesday, April 13, 2016 at 3:27:21 AM UTC-4, Niphlod wrote: > > there's none. admin is an

[web2py] Scheduler not finding module

2016-04-13 Thread peter
I have an issue with processes run by the scheduler are not seeing a module. If I Do python2.6 >>>import dropbox it imports fine. The conf file for the web2py scheduler contains DAEMON=python2.6 PARAMETERS="/opt/web-apps/web2py/web2py.py -K new_spin2" LOGFILE=/var/log/web2py-scheduler.log

[web2py] Re: missing response.title and subtitle

2016-04-13 Thread Anthony
I assume it's a CSS issue, but don't know what the original or new CSS looks like, so difficult to say. Maybe use the browser tools to inspect the CSS properties in both versions and figure out what is different. Anthony On Wednesday, April 13, 2016 at 2:14:54 AM UTC-4, Alex Glaros wrote: > >

[web2py] Re: Creating form in the view

2016-04-13 Thread Anthony
See http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-in-HTML. Note, by setting session=None, there is no _formkey in the form and therefore no CSRF protection. You can remove the session=None, but in that case you will have to include the _formkey hidden field in the

[web2py] Re: How to not let user input some particular values in the name field in this db?

2016-04-13 Thread Anthony
bad_names = ['list', 'of', 'bad', 'names'] db.define_table(..., Field('name', requires=IS_MATCH(r'^(?!%s)' % '|'.join('%s$' % w for w in bad_names)), ...) The above will produce a regular expression like: r'^(?!list$|of$|bad$|names$)' which will match anything except what is in the

[web2py] Re: How do you change the color of the label of the sqlforms display in the view?

2016-04-13 Thread Leonel Câmara
Use CSS? -- 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" group.

[web2py] Re: How to not let user input some particular values in the name field in this db?

2016-04-13 Thread Leonel Câmara
> You can also handle it at the client side, using JavaScript. No no, you can do it but you still need to validate it server side. Never trust external input. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] How to not let user input some particular values in the name field in this db?

2016-04-13 Thread Nico de Groot
See the Web2py book at http://web2py.com/books/default/chapter/29/07/forms-and-validators We have validators for this purpose. You can also handle it at the client side, using JavaScript. Nico de Groot -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Sending email w/ text & html

2016-04-13 Thread Leonel Câmara
It does send both the text and the HTML, the thing is that the HTML is placed in the email as a multipart/alternative to the text. multipart/alternative is used when each of the parts is an "alternative" version of the same information. Your email client then picks which one to show, since

[web2py] Re: Sending email w/ text & html

2016-04-13 Thread Scott Hunter
I tried this, but to no effect: only the HTML portion appears in the message, as before. - Scott On Tuesday, April 12, 2016 at 11:12:30 PM UTC-4, H. Das wrote: > > Hi can you try: > > mail.send(to='y...@example.com', subject=subject, message=msg, > headers={'Content-Type' : 'text/html'}) > >

[web2py] Re: How to integrate SendGrid in Web2py ?

2016-04-13 Thread Leonel Câmara
If you're asking this, I'm just going to tell you the most obvious way. Just use their SMTP server. I've never used sendgrid with web2py but the config would be something like this: mail.settings.server = 'smtp.sendgrid.net:587' mail.settings.login = 'sendgrid_username:sengrid_password'

[web2py] Creating form in the view

2016-04-13 Thread rajjmatthur
Newby question. def mydef(): form = SQLFORM(db.mytable) if form.process.accept(): conditions here return locals() view: {{=form}} What if form is defined in the view first. How to invoke the controller. if in view first name: last name: How to process this form and accept it in the

[web2py] How to not let user input some particular values in the name field in this db?

2016-04-13 Thread Stephen Duisberg
db.define_table('person', Field('name'), Field('pic','upload') ) What should I do such that the name field won't accept names with some words like 'the', 'rock' and all. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] How to integrate SendGrid in Web2py ?

2016-04-13 Thread Krishna Bavandlapally
How to integrate (default mailing) SendGrid in Web2py ? -- 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

[web2py] Re: Odd error

2016-04-13 Thread Niphlod
there's none. admin is an application by itself. On Tuesday, April 12, 2016 at 9:54:08 PM UTC+2, Jason Solack wrote: > > It's running in linux with apache/WSGI, i'm not exactly sure what you are > asking, how are we launching web2py? > > Just to be clear, we're looking into how the permissions

[web2py] How do you change the color of the label of the sqlforms display in the view?

2016-04-13 Thread Emmanuel Dsouza
exact syntax? -- 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] Re: missing response.title and subtitle

2016-04-13 Thread Alex Glaros
ooops, meant layout.html, not menu.py anyway, this looks much better (it's in layout.html): {{block header}} {{=response.title or request.application}} {{=response.subtitle or ''}} {{end}} Is there