[web2py] load question - only the words "loadin.."
I cannot get load results to appear on html page. Only the words " loading..." appear CONTROLLER def post(): comments=db(db.SuperObjectComment).select() return locals() LOAD DOCUMENT (named: post.load) {{for post in comments:}} On {{=post.created_on}} {{pass}} WHEN BROWSING TO http://127.0.0.1:8000/ES1/default/post.load, THE RESULTS ARE CORRECT On 2016-04-08 01:12:09 On 2016-04-08 11:16:37 On 2016-04-08 12:34:05 On 2016-04-08 19:47:51 On 2016-04-08 20:03:03 HTML PAGE (named post.html but also tried from other pages) {{extend 'layout.html'}} {{=LOAD('default','post.load',ajax=True)}} The only result is the word: loading... THE PAGE SOURCE SHOWS: loading... Thanks, Alex Glaros -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Nginx setup not as recommended
Can you review the script to look at what we do there : https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh On Fri, Apr 8, 2016 at 8:22 AM, 'Yan Wong' via web2py-users < web2py@googlegroups.com> wrote: > The web2py Nginx setup page ( > http://web2py.com/books/default/chapter/29/13/deployment-recipes#Nginx) > says to specify 'root' directory in two 'location' blocks, one for > /xxx/static and one for simply / > > But this is "bad practice" according to the 2nd recommendation in the > Nginx docs > > > https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ > > So which should I believe? And can I set it up to conform to Nginx best > practice? > > -- > 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. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Nginx setup not as recommended
On Saturday, April 9, 2016 at 12:53:24 AM UTC-4, Yan Wong wrote: > > The web2py Nginx setup page ( > http://web2py.com/books/default/chapter/29/13/deployment-recipes#Nginx) > says to specify 'root' directory in two 'location' blocks, one for > /xxx/static and one for simply / > I don't see the second "root". Does it not work? What do you suggest? Anthony -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: load question - only the word "loading.." displays
Has web2py.js loaded properly? If you check the browser developer tools, is the Ajax request getting sent, and if so, what is the response? Any JS errors in the browser console? Anthony On Saturday, April 9, 2016 at 3:16:56 AM UTC-4, Alex Glaros wrote: > > I cannot get load results to appear on html page. Only the word " > loading..." appears > > CONTROLLER > def post(): > comments=db(db.SuperObjectComment).select() > return locals() > > LOAD DOCUMENT (named: post.load) > {{for post in comments:}} > > On {{=post.created_on}} > > {{pass}} > > WHEN BROWSING TO http://127.0.0.1:8000/ES1/default/post.load, THE RESULTS > ARE CORRECT > On 2016-04-08 01:12:09 > On 2016-04-08 11:16:37 > On 2016-04-08 12:34:05 > On 2016-04-08 19:47:51 > On 2016-04-08 20:03:03 > > HTML PAGE (named post.html but also tried from other pages) > {{extend 'layout.html'}} > {{=LOAD('default','post.load',ajax=True)}} > > The only result is the word: loading... > > THE PAGE SOURCE SHOWS: > > > > > loading... > > > > > Thanks, > > Alex Glaros > > > > > -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: files vanished
This is nothing web2py would have done. And very difficult to provide any help with no further details. On Saturday, April 9, 2016 at 12:53:28 AM UTC-4, Sneka R wrote: > > Hi, > I have been using web2py for few days now. All the files I have created > has vanished. What happened? > -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: storing IS_IN_SET items in appconfig.ini
You're doing nothing wrong, it's just the way the ConfigParser module works in python, remember that the only thing you have in a config file are strings, config files are not Python. Luckily AppConfig take has a cast argument which you can use for this. So instead of tasks = ('Call', 'Meet', 'Email') myconf.take('dropdown_choices.tasks') Do this in your appconfig.ini [dropdown_choices] tasks = Call,Meet,Email And in your model do this myconf.take('dropdown_choices.tasks', cast=lambda foo: foo.split(',')) -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: storing IS_IN_SET items in appconfig.ini
On Saturday, April 9, 2016 at 10:34:00 AM UTC-4, Leonel Câmara wrote: > > You're doing nothing wrong, it's just the way the ConfigParser module > works in python, remember that the only thing you have in a config file are > strings, config files are not Python. Luckily AppConfig take has a cast > argument which you can use for this. So instead of > > tasks = ('Call', 'Meet', 'Email') > myconf.take('dropdown_choices.tasks') > > Do this in your appconfig.ini > [dropdown_choices] > tasks = Call,Meet,Email > > And in your model do this > myconf.take('dropdown_choices.tasks', cast=lambda foo: foo.split(',')) > And with the latest version of web2py, you can now do: myconf.get('dropdown_choices.tasks') Note the use of .get instead of .take (.get is a smart version of .take that does some automatic conversions, including converting comma separated lists into Python lists -- you can even put spaces after the commas and it will automatically strip them). Anthony -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: files vanished
Is the machine on the public internet? 2016-04-09 15:06 GMT+02:00 Anthony : > This is nothing web2py would have done. And very difficult to provide any > help with no further details. > > > On Saturday, April 9, 2016 at 12:53:28 AM UTC-4, Sneka R wrote: >> >> Hi, >> I have been using web2py for few days now. All the files I have created >> has vanished. What happened? >> > -- > 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. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Issues with site in production environment
Hello all, I am wondering if you all could sense chech my issue for me. I am creating sites that do a fair amount of analytics on large data sets and as such requests may take 30-90 seconds to get a response. My web server has 8 logical cores and once I have over 8 concurrent users they are essentially getting queued by apache ... If the queue becomes too long I start having a 500 response from apps in web2py. I followed the documentation for deployment in Apache... But I don't know if I should be tweaking Apache setting or if this behaviour is normal. I am wondering if anyone with more Apache experience may be able to point me in a direction that may keep my apps more stable. My server is ruining centos, apache, 8 cores... I have web2py launching with 8 processes and 16 threads. Thank you in advance for any help you can offer! Jasob -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Issues with site in production environment
It's generally not good to have HTTP requests taking so long. Instead, when such a request is made, you should pass the task off to a job queue (e.g., using web2py's built-in scheduler or some other similar solution) to be completed in the background. You can then have the browser poll the server every few seconds to determine when the job has completed, and then show the results (for a more sophisticated approach, you could set up websockets to push a notification to the browser). Anthony On Saturday, April 9, 2016 at 7:08:49 PM UTC-4, Jason Solack wrote: > > Hello all, I am wondering if you all could sense chech my issue for me. I > am creating sites that do a fair amount of analytics on large data sets and > as such requests may take 30-90 seconds to get a response. My web server > has 8 logical cores and once I have over 8 concurrent users they are > essentially getting queued by apache ... If the queue becomes too long I > start having a 500 response from apps in web2py. > > I followed the documentation for deployment in Apache... But I don't know > if I should be tweaking Apache setting or if this behaviour is normal. I > am wondering if anyone with more Apache experience may be able to point me > in a direction that may keep my apps more stable. > > My server is ruining centos, apache, 8 cores... I have web2py launching > with 8 processes and 16 threads. > > Thank you in advance for any help you can offer! > > Jasob > > -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Issues with site in production environment
Thank you for the tip, I will look into running the math as a background service, is the task scheduler the only way to achieve that? -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: load question - only the word "loading.." displays
Acting on your tip, I replaced the whole JS folder with the one from w2p Welcome app and it worked. Does the following indicate correct AJAX sending? XHR http://127.0.0.1:8000/test/default/post.load [HTTP/1.1 200 OK 859ms] The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page. thanks Anthony 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 (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Confirm Password in Customized Registration Form
Hello, everyone I want to customize my user registration page a little bit, and I am using the code like below: {{=form.custom.begin}} {{=form.custom.widget.username}} ... {{=form.custom.submit}} {{=form.custom.end}} I couldn't figure out what fieldname I should put for the "confirm password" Any help? -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: load question - only the word "loading.." displays
Looks OK -- you got a 200 response, and as you say, the component loads now. On Saturday, April 9, 2016 at 8:04:38 PM UTC-4, Alex Glaros wrote: > > Acting on your tip, I replaced the whole JS folder with the one from w2p > Welcome app and it worked. > > Does the following indicate correct AJAX sending? > > XHR > http://127.0.0.1:8000/test/default/post.load [HTTP/1.1 200 OK 859ms] > The Web Console logging API (console.log, console.info, console.warn, > console.error) has been disabled by a script on this page. > > thanks Anthony > > 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 (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Issues with site in production environment
On Saturday, April 9, 2016 at 7:57:29 PM UTC-4, Jason Solack wrote: > > Thank you for the tip, I will look into running the math as a background > service, is the task scheduler the only way to achieve that? The web2py scheduler is probably the easiest approach, as it is built in, but there are third party libraries for doing the same thing. Anthony -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: storing IS_IN_SET items in appconfig.ini
Leonel, Anthony, Thank you very much, both methods you mention work beautifully! cheers, Luca On Sunday, April 10, 2016 at 1:24:44 AM UTC+10, Anthony wrote: > > On Saturday, April 9, 2016 at 10:34:00 AM UTC-4, Leonel Câmara wrote: >> >> You're doing nothing wrong, it's just the way the ConfigParser module >> works in python, remember that the only thing you have in a config file are >> strings, config files are not Python. Luckily AppConfig take has a cast >> argument which you can use for this. So instead of >> >> tasks = ('Call', 'Meet', 'Email') >> myconf.take('dropdown_choices.tasks') >> >> Do this in your appconfig.ini >> [dropdown_choices] >> tasks = Call,Meet,Email >> >> And in your model do this >> myconf.take('dropdown_choices.tasks', cast=lambda foo: foo.split(',')) >> > > And with the latest version of web2py, you can now do: > > myconf.get('dropdown_choices.tasks') > > Note the use of .get instead of .take (.get is a smart version of .take > that does some automatic conversions, including converting comma separated > lists into Python lists -- you can even put spaces after the commas and it > will automatically strip them). > > Anthony > > -- 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. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.