[web2py] Re: One-Step Production Deployment: Who Moved the Cheese?

2016-06-18 Thread horridohobbyist
nx-uwsgi-ubuntu.sh > > Anthony > > On Saturday, June 18, 2016 at 4:35:37 PM UTC-4, horridohobbyist wrote: >> >> Is the web2py book out of date or out of sync? For one-step production >> deployment, the setup-web2py-ubuntu.sh file is no longer at Googlecode. >> >>

[web2py] One-Step Production Deployment: Who Moved the Cheese?

2016-06-18 Thread horridohobbyist
Is the web2py book out of date or out of sync? For one-step production deployment, the setup-web2py-ubuntu.sh file is no longer at Googlecode. How can I setup web2py to work on a headless Ubuntu server quickly and easily? -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: How to control authorization to REST api

2015-05-31 Thread horridohobbyist
authorization. Works like a charm. On Saturday, 30 May 2015 19:18:20 UTC-4, horridohobbyist wrote: I tried this decorator, too: auth.settings.allow_basic_login = True @auth.requires_login() jQuery still chokes on user authorization. Moreover, it tries to redirect you to a login page, which

[web2py] How to control authorization to REST api

2015-05-30 Thread horridohobbyist
I'm trying to implement a REST api. I've coded the following: @request.restful() def api(): response.view = 'generic.json' # curl -k --user tyr...@yahoo.ca:Lannister -G -d var1=something1 -d var2=something2 # https://miramar21.com/tut_server/default/api/verify/person/:usr/:pwd

[web2py] Re: How to control authorization to REST api

2015-05-30 Thread horridohobbyist
I tried this decorator, too: auth.settings.allow_basic_login = True @auth.requires_login() jQuery still chokes on user authorization. Moreover, it tries to redirect you to a login page, which in my case is not applicable. On Saturday, 30 May 2015 14:32:24 UTC-4, horridohobbyist wrote: I'm

[web2py] Database Update of Encrypted Fields

2015-05-25 Thread horridohobbyist
I have the following table definition: db.define_table('person', Field('email',requires=IS_NOT_IN_DB(db,'person.email')), Field('password',requires=[CRYPT(salt=False)]), Field('reg_key')) I have the following function definition for a REST service:

[web2py] Re: iframes not working

2015-03-19 Thread horridohobbyist
I don't know what that means. On Thursday, 19 March 2015 20:14:13 UTC-4, Leonel Câmara wrote: Do you have any errors in the console? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] iframes not working

2015-03-19 Thread horridohobbyist
No matter what I do, I cannot use iframes in my web2py apps. The *same iframe code* used in a static HTML file served from the same server as web2py works fine. (For testing, I used the same example as in the web2py book: iframe src=http://web2py.com;/iframe) Here's the odd thing: It has to

[web2py] Re: iframes not working

2015-03-19 Thread horridohobbyist
Yes... Mixed Content: The page at 'https://67.213.70.251/welcome/default/index' was loaded over HTTPS, but requested an insecure resource 'http://web2py.com/'. This request has been blocked; the content must be served over HTTPS. On Thursday, 19 March 2015 20:57:34 UTC-4, Leonel Câmara

[web2py] Re: iframes not working

2015-03-19 Thread horridohobbyist
Okay, so I changed the http: to https: in the iframe's src. That *should* solve the problem... However, the console shows that the URL was changed back to http:. WTF. Who's doing this??? I brought up View Source just to make that the src was, in fact, https:. Yep, it is. So for some reason,

[web2py] SQLFORM refresh

2015-03-12 Thread horridohobbyist
If I use SQLFORM to update an existing record and some of the fields may be altered (eg, uppercased, or stripped of whitespace), I would like the form to show the resulting field values, not the ones that the user originally entered. I can see no way to do this. -- Resources: -

Re: [web2py] SQLFORM Validation and Password Hashes

2015-03-10 Thread horridohobbyist
, 10 March 2015 02:13:26 UTC-4, Johann Spies wrote: On 10 March 2015 at 06:53, horridohobbyist horrido...@gmail.com javascript: wrote: I use SQLFORM to add records to a table. However, one of the fields is a password which requires=[IS_STRONG(upper=2),CRYPT(salt=False)]. I would like to use

Re: [web2py] SQLFORM Validation and Password Hashes

2015-03-10 Thread horridohobbyist
Nobody has any ideas?? Surely, this is a common use case... On Tuesday, 10 March 2015 07:41:45 UTC-4, horridohobbyist wrote: The table definition is: db.define_table('teams', Field('team_email',requires=[IS_EMAIL(),IS_NOT_IN_DB(db,'teams.team_email

[web2py] SQLFORM Validation and Password Hashes

2015-03-09 Thread horridohobbyist
I use SQLFORM to add records to a table. However, one of the fields is a password which requires=[IS_STRONG(upper=2),CRYPT(salt=False)]. I would like to use SQLFORM to update records in the table, but I run into a problem: the password field contains the hash of the password, which will not

[web2py] The Zen of web2py

2014-07-09 Thread horridohobbyist
I was thinking the other day it's so unfortunate that web2py has to live in the shadow of the great Django. As Massimo pointed out a while ago, the reason is because Django gets great PR. And Django users are a very vocal bunch. You can't walk the web framework landscape without tripping over

Re: [web2py] The Zen of web2py

2014-07-09 Thread horridohobbyist
...@xfr.co.uk javascript: : Hi, On 09/07/14 13:31, horridohobbyist wrote: Let's improve web2py's PR. A blast of articles over the next year could change the fortunes of our favourite web framework. Good piece, great finish. I'll take that as a challenge, and see if I can describe my own

[web2py] Re: Database compute fields

2014-04-14 Thread horridohobbyist
Are you saying I have to update the price field, regardless of whether it has changed or not?? That's not very logical. On Sunday, 13 April 2014 18:39:51 UTC-4, Anthony wrote: I believe you have to provide the price field in your update as well. -- Resources: - http://web2py.com -

[web2py] Re: Database compute fields

2014-04-14 Thread horridohobbyist
they may not all have the same price value and therefore might require different updated values in the computed field). On Monday, April 14, 2014 7:09:07 AM UTC-4, horridohobbyist wrote: Are you saying I have to update the price field, regardless of whether it has changed or not?? That's

[web2py] Database compute fields

2014-04-13 Thread horridohobbyist
I have the following table: db.define_table('cart', Field('quantity','integer'), Field('in_stock','integer',writable=False,represent=lambda v, r: 'Pre-ordered' if v 0 else '√'), Field('price','float',writable=False,represent=lambda v, r:

[web2py] SOAP

2014-04-08 Thread horridohobbyist
I would like to use SOAP to communicate with a third-party web service (eg, from Fedex), but the documentation (ie, web2py book) is awfully skimpy. I'd like to see some examples. I'd like to see a complete description of the API. I want to understand the general procedure for making a SOAP

[web2py] Delete in SQLFORM.grid does not update number of records

2014-04-05 Thread horridohobbyist
If I delete records in SQLFORM.grid, the number of records does not change. Only if I explicitly refresh the browser page does the number of records change. Have I found a bug? (I'm using web2py 2.9.4.) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] list:string

2014-04-03 Thread horridohobbyist
that? Or am I doing something wrong? On Thursday, 3 April 2014 02:49:45 UTC-4, Manuele wrote: Il 03/04/14 06:23, horridohobbyist ha scritto: I've added a 'list:string' field to my table, but when adding a new record from admin (using the new record form), I can't figure out how to enter

[web2py] Re: list:string

2014-04-03 Thread horridohobbyist
. On Thursday, April 3, 2014 12:23:08 AM UTC-4, horridohobbyist wrote: I've added a 'list:string' field to my table, but when adding a new record from admin (using the new record form), I can't figure out how to enter the data. I don't understand what format it expects. I tried ['item1','item2

[web2py] Re: list:string

2014-04-03 Thread horridohobbyist
the version of web2py.js associated with the version of web2py you are running, and that it is loaded on the page? On Thursday, April 3, 2014 10:17:58 AM UTC-4, horridohobbyist wrote: db.define_table('products', Field('thumbnail', 'upload',uploadfield='image_data',represent=lambda v

[web2py] Re: list:string

2014-04-03 Thread horridohobbyist
, horridohobbyist wrote: I upgraded to web2py 2.9.4 recently. Unless the upgrade was corrupted, I should be using the correct files. How can I tell if the web2py.js I have is correct or not? There's no identifying information. On Thursday, 3 April 2014 11:09:07 UTC-4, Anthony wrote: And you're

[web2py] Re: list:string

2014-04-03 Thread horridohobbyist
What and where is the JS console?? On Thursday, 3 April 2014 14:11:02 UTC-4, Anthony wrote: On Thursday, April 3, 2014 12:25:21 PM UTC-4, horridohobbyist wrote: Done. However, it didn't fix the issue, although I now see a tiny clickable '+' and '-' right beside the input field for 'Shift

[web2py] Re: list:string

2014-04-03 Thread horridohobbyist
For some reason, it's suddenly working with the newer web2py.js. Weird. On Thursday, 3 April 2014 14:11:02 UTC-4, Anthony wrote: On Thursday, April 3, 2014 12:25:21 PM UTC-4, horridohobbyist wrote: Done. However, it didn't fix the issue, although I now see a tiny clickable

[web2py] list:string

2014-04-02 Thread horridohobbyist
I've added a 'list:string' field to my table, but when adding a new record from admin (using the new record form), I can't figure out how to enter the data. I don't understand what format it expects. I tried ['item1','item2']. I tried |'item1'|'item2'|. They both don't work. -- Resources: -

Re: [web2py] Re: Dynamically Creating a Form

2014-03-31 Thread horridohobbyist
and allows dictionary-like syntax for accessing items. Similar syntax works with DAL Table and Row objects. Anthony On Monday, March 31, 2014 12:49:37 AM UTC-4, mweissen wrote: Try form.vars['color'] or take a variable v v=color form.vars[v] 2014-03-31 2:32 GMT+02:00 horridohobbyist

[web2py] Re: Dynamically Creating a Form

2014-03-30 Thread horridohobbyist
, but there is functionality which may be more helpful: http://web2py.com/books/default/chapter/29/05/the-views#Server-side-DOM-and-parsing On Sunday, 30 March 2014 00:11:27 UTC+11, horridohobbyist wrote: Is there a way for me to dynamically add form elements, such as INPUT fields or SELECT fields, to a form

[web2py] Re: Dynamically Creating a Form

2014-03-30 Thread horridohobbyist
:45:56 PM UTC-4, horridohobbyist wrote: Treating a form like a Python list works like a charm. However, having dynamically added SELECT fields, I don't know how to extract the form.vars for these fields. I don't know how to assign _name in a way that I can reference it after the form has been

[web2py] Dynamically Creating a Form

2014-03-29 Thread horridohobbyist
Is there a way for me to dynamically add form elements, such as INPUT fields or SELECT fields, to a form? I'm not sure how to do this. I'd like to add these elements only under certain conditions. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: jQuery load no longer working

2014-03-25 Thread horridohobbyist
2014 02:34:13 UTC-4, Massimo Di Pierro wrote: Missing a ) On Monday, 24 March 2014 21:49:51 UTC-5, horridohobbyist wrote: I have a strange issue. I had code that includes an external HTML file. It used to work. Lately, it suddenly no longer works. I've isolated the code and put it into my

[web2py] Searching an undisplayed column

2014-03-24 Thread horridohobbyist
I have a field called 'description'. In SQLFORM.grid, I do NOT want to display the 'description' field, but I do want to be able to search the 'description' field from the grid's search function. Is there a way to do this? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Searching an undisplayed column

2014-03-24 Thread horridohobbyist
I tried that, but it doesn't work. I solved it by letting the field be readable and hiding it with description.label=' ' and represent=lambda v,r: ''. Not particularly elegant, but it gets the job done. Of course, the search dropdown includes the ' ' label, but it's not a big deal. On Monday,

[web2py] jQuery load no longer working

2014-03-24 Thread horridohobbyist
I have a strange issue. I had code that includes an external HTML file. It used to work. Lately, it suddenly no longer works. I've isolated the code and put it into my Welcome program. I am unable to figure out what's wrong. script $(function(){

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
back to the initial situation where the results are consistently fast. *This pattern is repeatable*. FYI, I'm using processes=2 and threads=1. On Thursday, 20 March 2014 11:34:03 UTC-4, horridohobbyist wrote: processes=1 and threads=30 also seems to solve the performance problem. BTW, I'm

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
. On Saturday, 22 March 2014 11:01:16 UTC-4, horridohobbyist wrote: Something very strange is going on. After I've run the Welcome test where the results are consistently fast (ie, ~1.6 seconds), if I wait an hour or so and run the test again, I get something like the following: Begin

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
doesn't do much. It doesn't get much traffic, either. So it has plenty of free memory. On Saturday, 22 March 2014 12:49:21 UTC-4, Massimo Di Pierro wrote: Have you checked memory consumption? On Saturday, 22 March 2014 10:15:59 UTC-5, horridohobbyist wrote: Scratch my solution. It's not correct

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
, horridohobbyist wrote: Well, according to the 'free' command, even when I'm getting these slowdowns, I'm nowhere close to the memory limits: total used free shared buffers cached Mem: 39252443929003532344 0 23608 123856 Like I said, my

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
GIL). I'm not sure it's entirely Apache's fault. I suspect it's in the *interaction* between Apache and web2py. The interaction between Apache and Flask seems to avoid this problem. However, I am ill-equipped to follow up on this. On Saturday, 22 March 2014 16:28:22 UTC-4, horridohobbyist wrote

[web2py] Re: web2py 2.9.5 is OUT

2014-03-21 Thread horridohobbyist
I always have trouble upgrading from the Administrative Interface; it always complains about permissions. This is under Linux. Is it because web2py doesn't have sudo permission? Anyway, what's the safest way to manually install over my existing installation? Thanks. On Saturday, 15 March

Re: [web2py] Python Performance Issue, Part 2

2014-03-20 Thread horridohobbyist
processes=1 and threads=30 also seems to solve the performance problem. BTW, I'm having a dickens of a time reproducing the problem in my servers (either the actual server or the VM). I have not been able to discover how to reset the state of my tests, so I have to blindly go around trying to

Re: [web2py] Python Performance Issue, Part 2

2014-03-19 Thread horridohobbyist
. Bear in mind that the fastest servers, the greenlet or co-operative async servers, are not only limited to one process, but even to one thread. http://nichol.as/benchmark-of-python-web-servers On Wednesday, 19 March 2014 14:25:47 UTC+11, horridohobbyist wrote: I shall do

Re: [web2py] Python Performance Issue, Part 2

2014-03-19 Thread horridohobbyist
today, regardless of language (ie, Java, Ruby, PHP, etc.). I am 100% in agreement with its philosophy and goals. Please, keep up the good work! On Wednesday, 19 March 2014 07:27:54 UTC-4, horridohobbyist wrote: Yes, processes=3 and threads=1. I tried processes=1 and threads=3, and performance

[web2py] Python Performance Issue, Part 2

2014-03-18 Thread horridohobbyist
I took the shipping code that I ran in Flask (without Apache) and adapted it to run under Apache as a Flask app. That way, I'm comparing apples to apples. I'm comparing the performance of the shipping code between Flask and web2py. Below, I've included the 'default' file from

Re: [web2py] Python Performance Issue, Part 2

2014-03-18 Thread horridohobbyist
: WSGIDaemonProcess hello user=www-data group=www-data processes=number of cores + 1 threads=(0 or 1) If it's faster, then the GIL must be the cause. flask by default has much less features active (session for instance) 2014-03-18 21:04 GMT+01:00 horridohobbyist horrido...@gmail.comjavascript

Re: [web2py] Python Performance Issue, Part 2

2014-03-18 Thread horridohobbyist
is not good enough. On Tuesday, 18 March 2014 22:37:58 UTC-4, Massimo Di Pierro wrote: Thank you for all your tests. You should write a summary of your results with recommendations for Apache users. On Tuesday, 18 March 2014 19:44:29 UTC-5, horridohobbyist wrote: Done. With processes=3

Re: [web2py] Python Performance Issue, Part 2

2014-03-18 Thread horridohobbyist
=number of cores + 1 threads=(0 or 1) If it's faster, then the GIL must be the cause. flask by default has much less features active (session for instance) 2014-03-18 21:04 GMT+01:00 horridohobbyist horrido...@gmail.comjavascript:: I took the shipping code that I ran in Flask (without

Re: [web2py] Re: Python Performance Issue

2014-03-17 Thread horridohobbyist
: web2py.py --minthreads=1 --maxthreads=1 This will reduce the number of worker threads to 1. Rocket also runs a background non-worker thread that monitors worker threads and kills them if they get stuck. On Sunday, 16 March 2014 20:22:45 UTC-5, horridohobbyist wrote: Using gunicorn

Re: [web2py] Re: Python Performance Issue

2014-03-17 Thread horridohobbyist
. On Sunday, 16 March 2014 20:22:45 UTC-5, horridohobbyist wrote: Using gunicorn (Thanks, Massimo), I ran the full web2py Welcome code: Welcome: elapsed time: 0.0511929988861 Welcome: elapsed time: 0.0024790763855 Welcome: elapsed time: 0.00262713432312 Welcome: elapsed time: 0.00224614143372 Welcome

Re: [web2py] Re: Python Performance Issue

2014-03-17 Thread horridohobbyist
/desktop/v5/docs/en/Parallels_Desktop_Users_Guide/23076.htm On Monday, March 17, 2014 10:02:13 AM UTC-4, horridohobbyist wrote: Parallels VM running on a 2.5GHz dual-core Mac mini. I really don't know what Parallels uses. On Monday, 17 March 2014 00:05:58 UTC-4, Massimo Di Pierro wrote

Re: [web2py] Re: Python Performance Issue

2014-03-17 Thread horridohobbyist
... Gunicorn:Elapsed time: 0.0284719467163 Gunicorn:Elapsed time: 0.0778048038483 Gunicorn:Percentage fill: 60.0 Gunicorn:Begin... Gunicorn:Elapsed time: 0.026153087616 Gunicorn:Elapsed time: 0.0714471340179 Gunicorn:Percentage fill: 60.0 On Monday, 17 March 2014 12:21:33 UTC-4, horridohobbyist wrote

Re: [web2py] Re: Python Performance Issue

2014-03-17 Thread horridohobbyist
How or where do I locate the mod_wsgi settings? (I am the furthest thing from being an Apache expert as you can find.) Thanks. On Monday, 17 March 2014 20:20:00 UTC-4, Tim Richardson wrote: There is no question that the fault lies with Apache. Perhaps it is fairer to say the fault lies

Re: [web2py] Re: Python Performance Issue

2014-03-17 Thread horridohobbyist
I don't know if this is relevant, but in apache2.conf, there is a MaxClients parameter for the prefork MPM and it's set to 150. This is the default. I changed it to 15, but it made no difference in the test. On Monday, 17 March 2014 21:15:12 UTC-4, Tim Richardson wrote: (I am the furthest

Re: [web2py] Re: Python Performance Issue

2014-03-17 Thread horridohobbyist
I'm disturbed by the fact that the defaults are sensible. That suggests there is no way to improve the performance. A 2x-10x performance hit is very serious. I was considering dropping Apache and going with nginx/gunicorn in my Linux server, but I'm not sure that's a good idea. Apache is a

Re: [web2py] Re: Python Performance Issue

2014-03-16 Thread horridohobbyist
with 8GB. I can't quite figure out how to use gunicom. On Saturday, 15 March 2014 23:41:49 UTC-4, horridohobbyist wrote: I'll see what I can do. It will take time for me to learn how to use another framework. As for trying a different web server, my (production) Linux server

Re: [web2py] Re: Python Performance Issue

2014-03-16 Thread horridohobbyist
2014-03-16 14:47 GMT+01:00 horridohobbyist horrido...@gmail.comjavascript:: I've conducted a test with Flask. fred.py is the command line program. hello.py is the Flask program. default.py is the Welcome controller. testdata.txt is the test data. shippackage.py

Re: [web2py] Re: Python Performance Issue

2014-03-16 Thread horridohobbyist
://localhost:8000 Which part does not work for you? 2014-03-16 21:31 GMT+01:00 horridohobbyist horrido...@gmail.comjavascript:: Well, I managed to get gunicorn working in a roundabout way. Here are my findings for the fred.py/hello.py test: Elapsed time: 0.028 Elapsed time

Re: [web2py] Re: Python Performance Issue

2014-03-16 Thread horridohobbyist
statements (which may be affected by web2py custom_import and/or module weird behavior). On Sunday, 16 March 2014 08:47:13 UTC-5, horridohobbyist wrote: I've conducted a test with Flask. fred.py is the command line program. hello.py is the Flask program. default.py is the Welcome

Re: [web2py] Re: Python Performance Issue

2014-03-16 Thread horridohobbyist
: 0.00213503837585 Oddly enough, it's slightly faster! But still 37% slower than the command line execution. I'd really, really, **really** like to know why the shipping code is 10x slower... On Sunday, 16 March 2014 21:13:56 UTC-4, horridohobbyist wrote: Okay, I did the calculations test in my

[web2py] One Step Production Deployment

2014-03-15 Thread horridohobbyist
I'm trying to reinstall web2py on my Linux server. I'm trying to start from a clean slate... First, I've updated my server to Ubuntu Server 12.04. I've restored the original *httpd.conf* (empty file) and *sites-available/default* files for Apache2. So, for all intents and purposes, web2py is

[web2py] Re: One Step Production Deployment

2014-03-15 Thread horridohobbyist
Well, it's not the welcome app. I also can't access the administrative interface: https://67.213.70.250/admin It's almost as if web2py isn't running. How can I verify that the process is running? On Saturday, 15 March 2014 08:09:37 UTC-4, 黄祥 wrote: had you remove the welcome apps? please

[web2py] Re: One Step Production Deployment

2014-03-15 Thread horridohobbyist
that the Administrative Interface cannot locate the CSS for proper rendering. Any ideas? (Why is One step production deployment going so wrong???) On Saturday, 15 March 2014 07:57:59 UTC-4, horridohobbyist wrote: I'm trying to reinstall web2py on my Linux server. I'm trying to start from a clean

[web2py] Re: One Step Production Deployment

2014-03-15 Thread horridohobbyist
okay. But this begs the question: Why wasn't my test VM doing the same thing with respect to the _2.9.4 folder?? On Saturday, 15 March 2014 12:48:33 UTC-4, horridohobbyist wrote: Okay, I figured out what happened. During the One step production deployment, *for some reason

[web2py] Re: One Step Production Deployment

2014-03-15 Thread horridohobbyist
Sorry, I spoke too soon. While the visual rendering is okay, the menus don't work. So I can't create the _2.9.4 folder. Damn. On Saturday, 15 March 2014 13:08:36 UTC-4, horridohobbyist wrote: Okay, I solved the other piece of the mystery. The Administrative Interface view is now referencing

[web2py] Re: One Step Production Deployment

2014-03-15 Thread horridohobbyist
in regards to it has been addressed several times in the group. This seems to be one of those features that users have most problems finding information about... Regards On Saturday, March 15, 2014 6:18:50 PM UTC+1, horridohobbyist wrote: Sorry, I spoke too soon. While the visual rendering

Re: [web2py] Re: Python Performance Issue

2014-03-15 Thread horridohobbyist
Interestingly, now that I've got a fresh install of web2py with only the Welcome app, my Welcome vs command line test shows a consistent 2x discrepancy, just as you had observed. My next step is to gradually add back all the other apps I had in web2py (I had 8 of them!) and see whether the

[web2py] Re: One Step Production Deployment

2014-03-15 Thread horridohobbyist
: On Saturday, March 15, 2014 4:10:32 PM UTC-4, horridohobbyist wrote: Well, I solved the problem by installing manually from source (ie, wget, ./setup-web2py-ubuntu.sh). Can you explain what you mean by manually from source? Aren't those the exact instructions for the one-step production

Re: [web2py] Re: Python Performance Issue

2014-03-15 Thread horridohobbyist
to this performance issue, whether it be in WSGI or in web2py. I'll check in on this thread periodically... On Saturday, 15 March 2014 16:19:12 UTC-4, horridohobbyist wrote: Interestingly, now that I've got a fresh install of web2py with only the Welcome app, my Welcome vs command line test

Re: [web2py] Re: Python Performance Issue

2014-03-15 Thread horridohobbyist
2014 22:45:27 UTC-4, Anthony wrote: Are you able to replicate the exact task in another web framework, such as Flask (with the same server setup)? On Saturday, March 15, 2014 10:34:56 PM UTC-4, horridohobbyist wrote: Well, putting back all my apps hasn't widened the discrepancy. So I don't

[web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
I conducted a simple experiment. I took the Welcome app, surely the simplest you can have (no databases, no concurrency, etc.), and added the following to the index page: def test(): start = time.time() x = 0.0 for i in range(1,5000): x += (float(i+10)*(i+25)+175.0)/3.14

Re: [web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
Okay, version 2.6.5 is verified. No difference in the Python version. So how to explain the performance difference? On Friday, 14 March 2014 09:36:29 UTC-4, Jonathan Lundell wrote: On 14 Mar 2014, at 6:28 AM, horridohobbyist horrido...@gmail.comjavascript: wrote: I conducted a simple

Re: [web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
. On Friday, 14 March 2014 10:53:38 UTC-4, Jonathan Lundell wrote: On 14 Mar 2014, at 7:39 AM, horridohobbyist horrido...@gmail.comjavascript: wrote: Okay, version 2.6.5 is verified. No difference in the Python version. So how to explain the performance difference? It's getting

[web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
, March 14, 2014 9:28:48 AM UTC-4, horridohobbyist wrote: I conducted a simple experiment. I took the Welcome app, surely the simplest you can have (no databases, no concurrency, etc.), and added the following to the index page: def test(): start = time.time() x = 0.0 for i

[web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
I disagree. I'm getting very consistent results with time.time(). With a print statement, Welcome yields 0.587778091431 second, while the command line execution gives 0.0202300548553 second. Again, that's 29 times faster. On Friday, 14 March 2014 11:51:04 UTC-4, Leonel Câmara wrote: Time is

[web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
measurements. On Friday, 14 March 2014 09:28:48 UTC-4, horridohobbyist wrote: I conducted a simple experiment. I took the Welcome app, surely the simplest you can have (no databases, no concurrency, etc.), and added the following to the index page: def test(): start = time.time() x = 0.0

[web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
web2py from source? What kind of machine do you have? Massimo On Friday, 14 March 2014 08:28:48 UTC-5, horridohobbyist wrote: I conducted a simple experiment. I took the Welcome app, surely the simplest you can have (no databases, no concurrency, etc.), and added the following to the index page

Re: [web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
on it. BTW, how does one actually shutdown web2py once it's installed and running via Apache? On Friday, 14 March 2014 14:00:35 UTC-4, Michele Comitini wrote: Please try to profile as suggested we need more info. 2014-03-14 18:18 GMT+01:00 horridohobbyist horrido...@gmail.comjavascript:: I

Re: [web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
times faster!!! What more evidence do you need? Sorry to say, but there is something wrong with web2py. On Friday, 14 March 2014 14:44:58 UTC-4, Jonathan Lundell wrote: On 14 Mar 2014, at 11:28 AM, horridohobbyist horrido...@gmail.comjavascript: wrote: First, I don't know how to use

Re: [web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
I don't understand logging. How do I examine the log? Where is it?? On Friday, 14 March 2014 18:29:15 UTC-4, Michele Comitini wrote: Can you try with the following? note: no DAL, no sessions 2014-03-14 22:23 GMT+01:00 Niphlod nip...@gmail.com javascript:: On Friday, March 14, 2014

Re: [web2py] Re: Python Performance Issue

2014-03-14 Thread horridohobbyist
, horridohobbyist wrote: Okay, I have some excellent news to report. Well, excellent for me, not so much for you guys... I can reproduce the problem on another system. Here's what I did: My Mac has Parallels installed. I created a new VM, downloaded Ubuntu Server 12.04, and installed it. Then I

[web2py] Python Performance Issue

2014-03-13 Thread horridohobbyist
I have a rather peculiar Python performance issue with web2py. I'm using pyShipping 1.8a (from http://pydoc.net/Python/pyShipping/1.8a/). The standalone program from the command line works quickly. However, after I've incorporated the code into my web2py application, the same pyShipping code

Re: [web2py] Python Performance Issue

2014-03-13 Thread horridohobbyist
execution and web2py execution. Thanks. On Thursday, 13 March 2014 15:54:37 UTC-4, Jonathan Lundell wrote: On 13 Mar 2014, at 12:48 PM, horridohobbyist horrido...@gmail.comjavascript: wrote: I have a rather peculiar Python performance issue with web2py. I'm using pyShipping 1.8a (from

[web2py] Add Custom Function to Administrative Interface

2014-03-08 Thread horridohobbyist
Is there a way to add a custom function to the Administrative Interface? Something to do a more sophisticated report on databases? I could even live with running such a function from the shell, though a webpage would be nice. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] How to post a request to a web api

2014-03-06 Thread horridohobbyist
I'm trying to use a RESTful API by issuing a post. I found this tidbit on the Internet: http://www.web2pyslices.com/slice/show/1533/restful-api-with-web2py But it seems to be outdated, as I cannot import 'requests'. What's the procedure for working with a web API? (I suppose I could use

[web2py] Re: SQLFORM.grid to update page

2014-03-02 Thread horridohobbyist
is simpler I think. AJAX is a smoother user experience (there is no page reload, for example). On Sunday, 2 March 2014 03:34:41 UTC+11, horridohobbyist wrote: Okay, then, I see another issue... Right now, I'm trying to execute the function by using a link: links=[lambda row: A('Add

[web2py] Re: SQLFORM.grid to update page

2014-03-01 Thread horridohobbyist
) I do this to reload redirect(URL('default','editable_grid',vars=request._get_vars)), ) #preserving _get_vars means user goes back to same grid page, same sort options etc On Saturday, 1 March 2014 04:28:59 UTC+11, horridohobbyist wrote: I have a SQLFORM.grid and I would like to add

[web2py] Re: SQLFORM.grid to update page

2014-03-01 Thread horridohobbyist
webpage. How do I do that? Thanks. On Saturday, 1 March 2014 08:30:33 UTC-5, Anthony wrote: Notice in Tim's example, vars is an argument of URL(). On Saturday, March 1, 2014 7:40:36 AM UTC-5, horridohobbyist wrote: type 'exceptions.TypeError' redirect() got an unexpected keyword argument

[web2py] SQLFORM.grid to update page

2014-02-28 Thread horridohobbyist
I have a SQLFORM.grid and I would like to add a link or function to each row that will do something and immediately refresh/update the webpage. Is this possible? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] SQLFORM.grid pagination and messed up URL

2014-02-28 Thread horridohobbyist
I have a SQLFORM.grid with pagination. It's in a webpage with the following URL: https://mydomain.com/myapp/admin/view_client/auth_user/3 When you go to the next page of the grid, the URL becomes: https://mydomain.com/myapp/admin/view_client?page=2 However, this is patently wrong! The URL

Re: [web2py] Using Recaptcha

2014-02-25 Thread horridohobbyist
. Recaptcha(request, ) Kiran Subbaramanhttp://subbaraman.wordpress.com/about/ On Tue, 25-02-2014 6:40 AM, horridohobbyist wrote: I'm trying to use Recaptcha. I'm following the instructions given here: http://www.web2py.com/book/default/chapter/09

[web2py] Using Recaptcha

2014-02-24 Thread horridohobbyist
I'm trying to use Recaptcha. I'm following the instructions given here: http://www.web2py.com/book/default/chapter/09#CAPTCHA-and-reCAPTCHA However, when I try to execute the form, I get this error: type 'exceptions.AttributeError' 'NoneType' object has no attribute 'env' Traceback (most recent

[web2py] include_files() messing with third-party CSS

2014-02-23 Thread horridohobbyist
In web2py_ajax.html, the following line is screwing up the menu in a third-party CSS template: response.include_files() How can I find out what CSS files are being included in this line so that I can try to identify the offending CSS? Thanks. -- Resources: - http://web2py.com -

[web2py] Re: How to support flash in new layout

2014-02-22 Thread horridohobbyist
: 5px; z-index: 2; } div.error { background-color: red; color: white; padding: 3px; }/style On Friday, 21 February 2014 22:47:17 UTC-5, horridohobbyist wrote: I'm trying to apply a new layout from a third-party CSS template. It generally works. However, I am unable to get any flash

[web2py] How to support flash in new layout

2014-02-21 Thread horridohobbyist
I'm trying to apply a new layout from a third-party CSS template. It generally works. However, I am unable to get any flash messages (eg, response.flash). Trying to merge two sets of CSS files is very tricky. What is the absolute minimum CSS/JS that I need to get flash messages (without

[web2py] Re: SQLFORM.grid Search

2014-02-19 Thread horridohobbyist
the SQLFORM.grid code in gluon.sqlhtml to see how they work. Anthony On Monday, February 17, 2014 11:02:03 PM UTC-5, horridohobbyist wrote: I'm using SQLFORM.grid for my application. It's very powerful and saves me a lot of work. However, I would like to alter/customize the search function

[web2py] Buttons vs Text Links

2014-02-19 Thread horridohobbyist
Is there a way to render a (standard graphical) button as a text link? -- 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

[web2py] Eliminating Submit Button

2014-02-18 Thread horridohobbyist
I have a SQLFORM.grid that allows the user to select a query from a selection of queries. The user selects the query using this form: FORM(TABLE(TR(T(Choose Category:),SELECT([my_list ],_name='category',value=current)), TR(,INPUT(_type='submit' The grid is: SQLFORM.grid(query,

[web2py] SQLFORM.grid buttons as text

2014-02-18 Thread horridohobbyist
I've applied a layout that I downloaded from web2py.com. The layout turns the Edit and Delete buttons of SQLFORM.grid into textual links (anchors): Edit and Delete. However, the two text labels run together like so: EditDelete. I'd like to put some space between them, ie Edit Delete. I

  1   2   3   >