Re: [web2py] Re: Detecting changes to auth_user record of logged in user.

2016-10-07 Thread Michael Ellis
Thanks, Anthony. That works nicely. On Fri, Oct 7, 2016 at 10:32 AM Anthony <abasta...@gmail.com> wrote: > Have you tried adding: > > auth.user.update(userlevel=newlevel) > > Anthony > > > On Thursday, October 6, 2016 at 6:15:02 PM UTC-4, Michael Ellis wrote: &g

[web2py] Re: Detecting changes to auth_user record of logged in user.

2016-10-07 Thread Michael Ellis
feira, 6 de outubro de 2016 19:15:02 UTC-3, Michael Ellis > escreveu: >> >> >> I have the following code as a json service for changing user >> privileges. This app doesn't need the fine-grained control of Web2py RBAC >> so I've added an integer userlevel f

[web2py] Detecting changes to auth_user record of logged in user.

2016-10-06 Thread Michael Ellis
I have the following code as a json service for changing user privileges. This app doesn't need the fine-grained control of Web2py RBAC so I've added an integer userlevel field to auth_user. It mostly works as intended except when a logged in user alters her own userlevel. The change isn't

Re: [web2py] Re: Setting process title at web2py startup

2016-08-18 Thread Michael Ellis
Thanks. I'll let you know how it works out. On Thu, Aug 18, 2016 at 3:42 PM Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I think what you propose should work fine. I would set cron=False btw. > > > On Wednesday, 17 August 2016 15:08:08 UTC-5, Michael Ellis w

Re: [web2py] Re: Setting process title at web2py startup

2016-08-17 Thread Michael Ellis
ess is that you want it done at the level of the web2py server rocket. In > which case I would copy web2py.py into main.py and edit the latter. > > On Tuesday, 9 August 2016 10:48:10 UTC-5, Michael Ellis wrote: >> >> >> I'm running web2py in conjunction with a suite

[web2py] Setting process title at web2py startup

2016-08-09 Thread Michael Ellis
I'm running web2py in conjunction with a suite of other, independent, python processes. In development I often want to 'ps' or kill the entire suite from the command line. I've found the Python setproctitle module really useful for prepending a common label to all the process titles. In

Re: [web2py] web2py on BeagleBone Black: optimizing ajax

2014-02-14 Thread Michael Ellis
of the ajax action avoid unauthenticated users. 2014-02-13 22:29 GMT+01:00 Michael Ellis michael...@gmail.comjavascript: : That looks worth trying. Will I need to also remove the login_required decorator from my ajax function? On Thursday, February 13, 2014 3:57:02 PM UTC-5, Michele

Re: [web2py] web2py on BeagleBone Black: optimizing ajax

2014-02-13 Thread Michael Ellis
On Wednesday, February 12, 2014 5:17:02 PM UTC-5, Michele Comitini wrote: run the profiler on the board: Thanks Michelle, those are good tools. They show that my ajax function accounts for only 2.6% of the time spent. The rest is web2py overhead, especially dal.define_table(), despite

Re: [web2py] web2py on BeagleBone Black: optimizing ajax

2014-02-13 Thread Michael Ellis
On Thursday, February 13, 2014 2:45:13 PM UTC-5, Cliff Kachinske wrote: Michael, I'm curious about this. Do you turn migrate off globally, or on a table by table basis? I have a 0.py file where I assign True or False to settings.migrate. The tables I define for the app all have ,

Re: [web2py] web2py on BeagleBone Black: optimizing ajax

2014-02-13 Thread Michael Ellis
I added that just now. It may be helping. I can now open 4 browser windows to the page with the ajax and top shows about 70% cpu for the web2py process. Not a huge improvement but better than before. I need to run another profile to be a little more sure. On Thursday, February 13, 2014

Re: [web2py] web2py on BeagleBone Black: optimizing ajax

2014-02-13 Thread Michael Ellis
That looks worth trying. Will I need to also remove the login_required decorator from my ajax function? On Thursday, February 13, 2014 3:57:02 PM UTC-5, Michele Comitini wrote: db = None def setup_dal(): db = DAL(...) db.define_table(...) db.define_table(...) return db if

[web2py] web2py on BeagleBone Black: optimizing ajax

2014-02-12 Thread Michael Ellis
I'm doing some embedded development with Web2py 2.8.2 on a BeagleBone Black (specs here) running a no-gui ubuntu. Mostly it's going very well so far, but I need some help reducing cpu usage for an ajax call that one of my pages is running every 2 seconds. A typical sample of the data returned is

Re: [web2py] web2py on BeagleBone Black: optimizing ajax

2014-02-12 Thread Michael Ellis
with profiling files. move the profiling files to your desktop machine and analyze them all together with runsnake (pip install runsnakerun). That should help to find the exact spot where the load is. mic 2014-02-12 21:13 GMT+01:00 Michael Ellis michael...@gmail.comjavascript: : I'm doing

[web2py] Coping with new behavior of _referenced_by

2013-05-01 Thread Michael Ellis
I've got an app from before 2.0 with wizard-generated code in multiple views that looks similar to this. {{=form}} {{for t,f in db.t_sys_config._referenced_by:}}{{if not t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,form.record.id)))}}]{{pass}}{{pass}} Under

[web2py] Broken links on web2py.com downloads page?

2013-04-11 Thread Michael Ellis
Just tried downloading web2py from web2py.com and repeatedly got 502 Bad Gateway. Tried from 2 different machines, including the one from which I'm sending this post. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] Re: Broken links on web2py.com downloads page?

2013-04-11 Thread Michael Ellis
PM UTC-4, David Ripplinger wrote: Me too. Please somebody fix this. On Thursday, April 11, 2013 2:33:59 PM UTC-4, Michael Ellis wrote: Just tried downloading web2py from web2py.com and repeatedly got 502 Bad Gateway. Tried from 2 different machines, including the one from which I'm

Re: [web2py] Re: Need help with impersonate

2013-04-10 Thread Michael Ellis
SOLVED (6 months later) I put this aside six months ago when I couldn't make it work. Today I really needed it so I dug out pdb and drilled down into auth.has_permission(). Finally, the light dawned on me. The table_name field is a string! Changing it to auth_user fixed the problem. May I

Re: [web2py] Need to automatically update a SQLFORM grid if new records are inserted in table

2013-04-07 Thread Michael Ellis
Hey Ricardo! Thanks very much for this and apologies for my tardy reply. I got pulled away onto other things and just now got back to testing it. It works beautifully. On Saturday, March 16, 2013 10:16:28 PM UTC-4, Ricardo Pedroso wrote: On Sat, Mar 16, 2013 at 10:42 PM, Michael Ellis

[web2py] Need to automatically update a SQLFORM grid if new records are inserted in table

2013-03-16 Thread Michael Ellis
I've got an application that accepts JSON test reports from remote systems and displays them in a SQLFORM grid with the most recent reports first. The controller and view for what the user sees is essentially the following: CONTROLLER def test_report_manage(): Controller for Reports page

Re: [web2py] Re: Restricting dropdown options in SQLFORM.grid in queries on hierarchical tables.

2012-09-17 Thread Michael Ellis
can) So I let default values be populated, but on submit I validate and return error. Looking for suggestions to improve on both counts (edit/new). -Mandar On Monday, September 17, 2012 4:14:54 AM UTC+5:30, Michael Ellis wrote: Suppose I have an app that allows grandparents to enter

Re: [web2py] Re: Need help with impersonate

2012-09-16 Thread Michael Ellis
Thanks Alan and Massimo. I will retest with sources from trunk as soon as I get a chance to spend some time on it. Am I right that the patch is simply a fix to the web presentation, i.e. the impersonate functionality to should work without it? Cheers, Mike On Sun, Sep 16, 2012 at 11:35 AM,

[web2py] Restricting dropdown options in SQLFORM.grid in queries on hierarchical tables.

2012-09-16 Thread Michael Ellis
Suppose I have an app that allows grandparents to enter, view, and edit information about their children and grandchildren. I want to make sure that each grandparent can see only his/her family's information and I want to use SQLFORM.grid. Using a query of the form q = (db.children.parent ==

[web2py] Need help with impersonate

2012-09-15 Thread Michael Ellis
in the auth tables. $ python web2py.py -S init -M Version 1.99.7 (2012-03-04 22:12:08) stable *I have 2 users,* print db(db.auth_user.id0).select() auth_user.id,auth_user.first_name,auth_user.last_name, ... 1,Michael,Ellis, ... *(me)* 2,John,Bigbooty, ... *and one group called 'admin',* print db

[web2py] Customizing SQLFORM.grid element styles

2012-09-14 Thread Michael Ellis
I've got an app that uses SQLFORM.grid in a number of pages. At the end of each row in my grid, the View, Edit, Create, Delete buttons are rendered as text links with no horizontal margin or padding, ie they render like this: *ViewEditCreateDelete* I'd like to at least put some horizontal space

[web2py] Re: Customizing SQLFORM.grid element styles

2012-09-14 Thread Michael Ellis
than View, Edit, Create, Delete, Add, Export? On Friday, September 14, 2012 11:03:37 AM UTC-4, Michael Ellis wrote: I've got an app that uses SQLFORM.grid in a number of pages. At the end of each row in my grid, the View, Edit, Create, Delete buttons are rendered as text links

[web2py] Record-level access authorization question

2012-04-21 Thread Michael Ellis
Given a set of tables in strict hierarchy, e.g. organization -- site -- building -- system -- circuit where -- denotes a one-to-many relationship and each of the first 3 tables contains an email address field, f_contact_email, that corresponds to a registered user, what's the best way to

Re: [web2py] Record-level access authorization question

2012-04-21 Thread Michael Ellis
Thanks Khalil, but I'm not sure how that solves my problem. I want, if possible, to automate a filtering operation that will apply to every query and exclude records the user is not allowed to see based on where his email address appears in the organization -- site -- building hierarchy. The

Re: [web2py] Re: Record-level access authorization question

2012-04-21 Thread Michael Ellis
Awesome! Thanks Anthony, I think that's precisely the solution I was hoping existed. The login issue should not be a problem since I already have @auth.requires('login') in front of every controller function. So if I'm understanding common filters correctly, the common_filter on my t_circuits

Re: [web2py] Re: Record-level access authorization question

2012-04-21 Thread Michael Ellis
On Sat, Apr 21, 2012 at 7:31 PM, Anthony abasta...@gmail.com wrote: def circuit_filter(query): Allow only records where auth_user matches the organization, site or building that owns the system that owns this circuit. eml = auth.user.email sys =

Re: [web2py] Re: How can I reduce shell memory usage?

2012-01-03 Thread Michael Ellis
of space. I am not sure about the impact on Ram but the impact on Disk space is significative. Massimo On Jan 2, 3:04 pm, Michael Ellis michael.f.el...@gmail.com wrote: Found some advice from Massimo in another thread. After adding try: _junk = db except NameError: _w2pdir

[web2py] How can I reduce shell memory usage?

2012-01-02 Thread Michael Ellis
495 -- HERE'S THE SCRIPT Web2py shell app for investigating memory use Author: Michael Ellis import signal DEBUGGER_INTERRUPT = False def debug_me(signum, frame): This signal handler provides a mechanism for remote

[web2py] Re: How can I reduce shell memory usage?

2012-01-02 Thread Michael Ellis
Thanks Ross,  that sounds like a good approach.  I do something analogous in my app.   All my scripts live in the app/modules/ directory.  My app is a remote monitoring system running on a Foxconn NetTop under Linux Mint 10.   There is a web2py http interface used for installation and

[web2py] Re: How can I reduce shell memory usage?

2012-01-02 Thread Michael Ellis
, auto_import = True) to my test script, running it without web2py gets the memory footprint down from 25 Mb to 13Mb. That's definitely an improvement. Anyone know how to shave it further? It still seems a little high for what it's doing. On Jan 2, 3:01 pm, Michael Ellis

[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-12 Thread Michael Ellis
Thanks, Gour. It's a nice looking framework and seems to be well- designed. I look forward to the web2py version! On Nov 12, 3:12 am, Gour g...@atmarama.net wrote: On Fri, 11 Nov 2011 14:34:32 -0800 (PST) Michael Ellis michael.f.el...@gmail.com wrote: For a site like this, the CMS

[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-11 Thread Michael Ellis
Here's a real world example: I'm on the board of the Asheville Choral Society, http://www.ashevillechoralsociety.org . Like most non-profits, we're short of money and as the only software geek on the board, I end up donating a fair amount of time (that I'd much rather spend rehearsing the

[web2py] Re: Communicating With C Application

2011-10-31 Thread Michael Ellis
I haven't tried this, but the first direction I'd consider would be to find a C library for parsing JSON and call the read methods with a .json extension. See the web2py book for more about getting json results from web2py controllers. Also, if the rules of your class permits it, you could

[web2py] DAL and multiple web2py -S processes.

2011-10-12 Thread Michael Ellis
Help! I'm running into a serious and puzzling problem running multiple web2py shell processes against a common database.  I'm using web2py 1.97 and sqlite3 under Linux Mint 10 with an ext4 file system.   In a nutshell, the problem is that I'm getting various DatabaseErrors when one process

[web2py] Re: DAL and multiple web2py -S processes.

2011-10-12 Thread Michael Ellis
decided to disable that just to get a little better performance :-( Yuck! On Oct 12, 10:59 am, Jonathan Lundell jlund...@pobox.com wrote: On Oct 12, 2011, at 7:48 AM, Michael Ellis wrote: Help! I'm running into a serious and puzzling problem running multiple web2py shell processes against

[web2py] Re: DAL and multiple web2py -S processes.

2011-10-12 Thread Michael Ellis
, 12:03 pm, Michael Ellis michael.f.el...@gmail.com wrote: I'd turn on the ext4 barrier option just for the heck of it; see what happens. http://lwn.net/Articles/283161/ Thank you, Jonathan! That seems promising.  I'm now testing it on two systems.  So far so good.  Let's see if it holds

[web2py] Re: DAL and multiple web2py -S processes.

2011-10-12 Thread Michael Ellis
12, 2011, at 9:16 AM, Michael Ellis wrote: Hmmm, still not completely out of the woods.  I've seen one instance of the error so far on one of the new systems.  I ran PRAGMA integrity_check from a sqlite3 command line and saw a bunch of page never used reports.  Then I ran VACUUM and re-ran

[web2py] DatabaseError: file is encrypted or is not a database

2011-09-23 Thread Michael Ellis
Has anyone encountered the error in the message subject before? I saw it for the first time last night in the logs of one of the embedded servers I described in a recent post. Here's the code that threw the error def _sysid(): Utility. Returns f_system_identifier_string sysid =

[web2py] Web2py in a pure python data acquisition system

2011-09-02 Thread Michael Ellis
For the past couple of months, I've been developing a data acquisition product for a client. It's turning out very well. I can't share the code, alas, but I can share the design approach and speak, in particular, to the way Web2py has turned out to be a huge asset. This is a 100% pure python

[web2py] Re: Priorities for web2py applications?

2011-09-02 Thread Michael Ellis
When things get murky, WinPDB http://winpdb.org/ is your best friend. Despite the unfortunate name, it has nothing to do with Windows. It's a free thread and fork aware python debugger. You can learn an amazing amount about what's going on under the hood in a very short time. Cheers, Mike On

[web2py] Re: SQLTABLE default numeric format

2011-08-19 Thread Michael Ellis
Thanks, Bruno. On Aug 18, 9:55 pm, Bruno Rocha rochacbr...@gmail.com wrote: CORRECTIONl: for field in db.mytable.fields: *    field = db.mytable[field]*     if field.type == 'double':         field.represent = lambda value: %.2f % value

[web2py] SQLTABLE default numeric format

2011-08-18 Thread Michael Ellis
This feels like a dumb question but I haven't found the answer with Google or by searching the web2py book, so here goes: If I have a view with {{=SQLTABLE(rows,headers=headers)}} where rows is the result of a select, is there any way to specify a default numeric precision, e.g. '%0.2f' to be

[web2py] Re: Import: a chicken-and-egg problem

2011-08-08 Thread Michael Ellis
if there's a better way. On Aug 7, 12:40 pm, Michael Ellis michael.f.el...@gmail.com wrote: I'm using the web2py shell mode to run a background process, let's call it toplevel.py,  that waits on pipe for incoming data, processes, and stores it in the db.  Works beautifully.  Even supports forking

[web2py] Import: a chicken-and-egg problem

2011-08-07 Thread Michael Ellis
I'm using the web2py shell mode to run a background process, let's call it toplevel.py, that waits on pipe for incoming data, processes, and stores it in the db. Works beautifully. Even supports forking a child process that monitors the db and sends periodic reports and alerts by email to a

[web2py] inserts from background process not visible on admin page

2011-07-24 Thread Michael Ellis
I'm running a background process started with web2py -S as described in the web2py book. The background process receives data from an external process and inserts it into a table in the sqlite3 db. This appears to be succeeding but when I try to access the table from the admin page using a

[web2py] Re: inserts from background process not visible on admin page

2011-07-24 Thread Michael Ellis
Never mind. I hadn't realized that updates and inserts from a background process needs an explicit db.commit(). Seems to be working correctly now by just blindly calling db.commit() after the insert returns. On Jul 24, 1:02 pm, Michael Ellis michael.f.el...@gmail.com wrote: I'm running

[web2py] Passing None to controller functions with urllib.urlencode

2011-07-21 Thread Michael Ellis
In a data acquisition system, I need to handle reports for sensor channels that may not have anything connected to them. The relevant fields in my table definition look like: Field('f_ch1_value_double', type = 'double', default = None, label = T(CH1)),

[web2py] Re: CRITICAL IMPORTANCE

2010-10-04 Thread Michael Ellis
Tried adding my site, http://peertool.appspot.com. Success was indicated, but so far it's not showing up. On Oct 4, 4:18 pm, Anthony av201...@yahoo.com wrote: I tried adding a few I know about (tenthrow.com, radbox.me, Sahana Eden demo). The detail pages said the sites were added, but so far,

Re: [web2py] Re: How do I optimize cache expiration on GAE?

2010-09-16 Thread Michael Ellis
? Are any of those files *not* served from the /static folder? On Sep 14, 3:43 pm, Michael Ellis michael.f.el...@gmail.com wrote: When I analyze the network performance of my GAE hosted application, http://peertool.appspot.com with Chrome Dev Tools Audit, the top listed suggestion

[web2py] Re: misunderstandings

2010-09-16 Thread Michael Ellis
Thanks Massimo, the AlterEgo posting makes the case for exec and the capitalized helper class names clearly and persuasively! I agree with Anthony that it belongs in the book. I was never much bothered by either of those issues, but there is one bit of 'magic' that did (and to some extent still

Re: [web2py] accepts [was: misunderstandings]

2010-09-16 Thread Michael Ellis
was unable to store extra info in the form object at view time and have it available after form.accepts() came back True. Is that a fair summary of how it works? On Thu, Sep 16, 2010 at 11:04 AM, Jonathan Lundell jlund...@pobox.comwrote: On Sep 16, 2010, at 7:26 AM, Michael Ellis wrote: I

Re: [web2py] Re: accepts [was: misunderstandings]

2010-09-16 Thread Michael Ellis
(in particular because of how widgets are dealt with) but the API is clean and it works well. Massimo On Sep 16, 12:08 pm, Michael Ellis michael.f.el...@gmail.com wrote: Thanks, Jonathan. That's approximately what I had reasoned it must be doing, but couldn't state as clearly as you have. So

[web2py] HTML5 Boilerplate

2010-09-15 Thread Michael Ellis
Just came across this while searching for something else. Haven't played with it at all yet. Looks as though the authors have packaged together a fairly comprehensive set of html/css/js techniques for cross-browser compatibility and good performance. Some of the techniques might be worth

[web2py] Re: Routes.py on GAE

2010-09-15 Thread Michael Ellis
Not sure if this is related; apologies if not. I have web2py/routes.py containing routes_in = ( ('/favicon.ico', '/init/static/favicon.ico'), ('/robots.txt', '/init/static/robots.txt'), ) routes_out = () and app.yaml containing - url: /(?Pa.+?)/static/(?Pb.+) static_files:

Re: [web2py] Re: Routes.py on GAE

2010-09-15 Thread Michael Ellis
The error is reported by GAE Launcher, the test app you use before deploying to GAE. Hence the OS X path. Nothing else seems wrong; the app's pages render correctly etc. On Wed, Sep 15, 2010 at 6:16 PM, Jonathan Lundell jlund...@pobox.comwrote: On Sep 15, 2010, at 2:53 PM, Michael Ellis

Re: [web2py] Re: Routes.py on GAE

2010-09-15 Thread Michael Ellis
to version control anything outside my app's directory. Cheers, Mike On Wed, Sep 15, 2010 at 6:59 PM, Jonathan Lundell jlund...@pobox.comwrote: On Sep 15, 2010, at 3:46 PM, Michael Ellis wrote: The error is reported by GAE Launcher, the test app you use before deploying to GAE. Hence the OS

Re: [web2py] Re: Routes.py on GAE

2010-09-15 Thread Michael Ellis
, at 4:39 PM, Michael Ellis wrote: Problem resolved, thanks to suggestion from cfh. Added explicit favicon.ico handler That's good, but do we understand why the original didn't work? (Just curious.) - url: /favicon.ico static_files: applications/init/static/favicon.ico upload

[web2py] How do I optimize cache expiration on GAE?

2010-09-14 Thread Michael Ellis
When I analyze the network performance of my GAE hosted application, http://peertool.appspot.com with Chrome Dev Tools Audit, the top listed suggestion for improvement is Leverage browser caching, viz. The following resources are missing a cache expiration. Resources that do not specify an

[web2py] Re: Making asynchronous request in web2py

2010-09-09 Thread Michael Ellis
Others may have more experience with this, but it sounds like your example could be handled with a cron job that periodically checks for newly registered users. On GAE, you also have the option to use a task queue. On Sep 9, 7:05 am, Adi aditya.sa...@gmail.com wrote: Hi, I have this test

[web2py] ANN: PeerTool, a web2py app for collaborative problem solving

2010-08-31 Thread Michael Ellis
Hi all, First of all, a thousand thanks to Massimo and all the regulars on this group. It's made all the difference in getting this app written. As usual, the credit is theirs, the blame mine. Version 0.55 of PeerTool is available for use on GAE at http://peertool.appspot.com There's an

Re: [web2py] Re: ANN: PeerTool, a web2py app for collaborative problem solving

2010-08-31 Thread Michael Ellis
...@cs.depaul.edu wrote: I have not seen the entire video yet but I will soon. Seems very interesting and could be useful for teaching. Massimo On Aug 31, 6:43 pm, Michael Ellis michael.f.el...@gmail.com wrote: Hi all, First of all, a thousand thanks to Massimo and all the regulars

[web2py] Re: Some questions about embedding debugging ...

2010-08-29 Thread Michael Ellis
I do all my development in a web2py instance running under winpdb on OS X 10.6. It's been a huge help to always have instant access to debugging and so far, I haven't seen any significant slowdown in performance. Winpdb can be a bit of a pain to install because of the WxPython dependencies, but

[web2py] Re: Server fails every 3 hour

2010-08-28 Thread Michael Ellis
Massimo, can the technique described in the book be used on GAE? Thx, Mike On Aug 27, 10:23 pm, Bruno Rocha rochacbr...@gmail.com wrote: Thanks Massimo. , 2010/8/27 mdipierro mdipie...@cs.depaul.edu Run the web server with -N (no cron) and run a separate backrgound process for cron.

Re: [web2py] Re: Server fails every 3 hour

2010-08-28 Thread Michael Ellis
...@cs.depaul.edu wrote: No but cron does not work on gae either. On gae you can use taskque. On Aug 28, 7:25 am, Michael Ellis michael.f.el...@gmail.com wrote: Massimo, can the technique described in the book be used on GAE? Thx, Mike On Aug 27, 10:23 pm, Bruno Rocha rochacbr...@gmail.com

[web2py] Re: How may I revoked a user logged in server side

2010-08-27 Thread Michael Ellis
I have a similar but perhaps simpler problem. When I detect excessive activity that might be a bot, I want to 1. Log the user out 2. Force a re-captcha on the next login only. So if I have something like: try: if form.accepts(...): etc ... except ActivityLimitException:

Re: [web2py] Re: Line continuation problem in new parser?

2010-08-23 Thread Michael Ellis
wrote: Did this work before? I do not think continuation was ever supported. Massimo On Aug 22, 2:13 pm, Michael Ellis michael.f.el...@gmail.com wrote: In Version 1.83.2 (2010-08-15 02:10:01) this works: {{ for r in rows: =DIV(SPAN(r[0]), SPAN(fcw[r[0]]), SPAN(fcw[r[1

[web2py] Line continuation problem in new parser?

2010-08-22 Thread Michael Ellis
In Version 1.83.2 (2010-08-15 02:10:01) this works: {{ for r in rows: =DIV(SPAN(r[0]), SPAN(fcw[r[0]]), SPAN(fcw[r[1]])) pass }} but this raises a syntax error: {{ for r in rows: =DIV(SPAN(r[0]), SPAN(fcw[r[0]]), SPAN(fcw[r[1]])) pass }} Tried '\' continuations

Re: [web2py] Re: Solutions to a couple of IE layout problems

2010-08-19 Thread Michael Ellis
going to tag the version in my repo before I commit the fixes so I can try reproducing the problem when I get chance to look at the new layout.html On Thu, Aug 19, 2010 at 12:17 PM, mdipierro mdipie...@cs.depaul.edu wrote: How about the new layout.html? On Aug 19, 11:12 am, Michael Ellis

Re: [web2py] Re: Solutions to a couple of IE layout problems

2010-08-19 Thread Michael Ellis
. Cheers, Mike On Thu, Aug 19, 2010 at 1:15 PM, mdipierro mdipie...@cs.depaul.edu wrote: Nobody understands why IE works the way it does. :-( If you made chanegs to web2py_ajax.html that will be helpful to others, let us know. On Aug 19, 11:38 am, Michael Ellis michael.f.el...@gmail.com

[web2py] Re: Seeking advice: web2py app project hosting and licensing

2010-08-17 Thread Michael Ellis
Code / Mercurial ... all for no cost so we find that it is a hard combo to beat although it would be nice if someone did! Cheers, Chris On Aug 16, 4:14 pm, Michael Ellis michael.f.el...@gmail.com wrote: Hello all, I've been working for the past few months on a group collaboration

[web2py] Seeking advice: web2py app project hosting and licensing

2010-08-16 Thread Michael Ellis
Hello all, I've been working for the past few months on a group collaboration and problem solving application and am almost ready to put up a beta version on GAE for folks to experiment with. Many thanks to Massimo and all of you regulars here for helping me up the learning curve! The app is

[web2py] Re: this must be asked a 1000 times, but I couldn't find the answer

2010-08-04 Thread Michael Ellis
As my application's views have become more complex, I've also been considering the same questions concerning Python vs HTML coding. I've tried using the helpers but my brain finds the stacks of parentheses even more confusing than HTML closing tags. Currently, I'm defining functions in my views

[web2py] Debugging view template logic

2010-08-02 Thread Michael Ellis
One of my views has a number of if else clauses to control what the user sees depending on context. I'm finding it painfully difficult to debug because omitting a pass statement generates a not very helpful error: Traceback (most recent call last): File /Users/mellis/w2ptip/gluon/rocket.py,

[web2py] Re: Debugging view template logic

2010-08-02 Thread Michael Ellis
Missing pass in view or too many pass in view. This has to do with cron / rocket failing, nothing to do with template. -- Thadeus On Mon, Aug 2, 2010 at 10:57 AM, Michael Ellis michael.f.el...@gmail.com wrote: One of my views has a number of if else clauses to control what the user sees

Re: [web2py] Re: Debugging view template logic

2010-08-02 Thread Michael Ellis
jlund...@pobox.comwrote: On Aug 2, 2010, at 9:21 AM, Michael Ellis wrote: I'm pretty sure it does because I've fixed several instances during the past two days by correcting pass statements. I'll try to create a minimal example to post here. That would be good. Whatever it is, it's

Re: [web2py] Re: Debugging view template logic

2010-08-02 Thread Michael Ellis
a possibility. There is no way to know where you intended to place the pass statement. -- Thadeus On Mon, Aug 2, 2010 at 11:47 AM, Michael Ellis michael.f.el...@gmail.com wrote: Ok, think I know what was going on: 1. I did have a missing pass statement 2. I had not restarted web2py after

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
that are as shipped in v1.85. Cheers, Mike On Jul 27, 12:17 pm, Jonathan Lundell jlund...@pobox.com wrote: On Jul 27, 2010, at 9:01 AM, Michael Ellis wrote: Thanks for the info about sloth. I may try it later. It was pretty easy to get what I needed with ipython: procs

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
='static', f=gauge.png) ... Removing the colon at the end of the comment fixed it. * * On Thu, Jul 29, 2010 at 8:19 AM, Michael Ellis michael.f.el...@gmail.comwrote: Testing under way... (Iceberg, I'm running OS X 10.6.4) Cheers, Mike On Thu, Jul 29, 2010 at 2:57 AM, mdipierro mdipie

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
of {{# comments. On Jul 29, 7:55 am, Michael Ellis michael.f.el...@gmail.com wrote: Has anything changed at tip in the view parser? Looks like there may be a problem now with colons at the end of comment lines. I have a view with the following that was working fine before I updated this morning

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
without On Thu, Jul 29, 2010 at 11:38 AM, mdipierro mdipie...@cs.depaul.edu wrote: with or without -N On Jul 29, 10:27 am, Michael Ellis michael.f.el...@gmail.com wrote: No process leakage in instances I've been running since this morning. Open file count appears stable, too. Cheers

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
:55 am, Michael Ellis michael.f.el...@gmail.com wrote: Has anything changed at tip in the view parser? Looks like there may be a problem now with colons at the end of comment lines. I have a view with the following that was working fine before I updated this morning. {{ ## On entry, vars

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
:22 am, Michael Ellis michael.f.el...@gmail.com wrote: I've isolated the problem but absolutely do not understand it. I can reproduce it with a two-line change to web2py_ajax.html. Will someone with the time and equipment please attempt to replicate

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
restarting. Are you using cron? On Jul 27, 7:33 am, Michael Ellis michael.f.el...@gmail.com wrote: Not sure if this is related to Rocket or whether a new topic is needed. This morning I found several OSError reports about Too many open files in a web2py development server that's

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
files and about 10 pipes associated with each pid. I'll check again in a few hours and see if the numbers are increasing. Cheers, Mike On Tue, Jul 27, 2010 at 11:23 AM, Jonathan Lundell jlund...@pobox.comwrote: On Jul 27, 2010, at 5:33 AM, Michael Ellis wrote: This morning I found several

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
in there? On Jul 27, 11:01 am, Michael Ellis michael.f.el...@gmail.com wrote: Thanks for the info about sloth. I may try it later. It was pretty easy to get what I needed with ipython: procs = !ps ax | grep web2py pids = [r[0] for r in procs.fields()[0:-2]] for p in pids

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-24 Thread Michael Ellis
to browser. On Fri, Jul 23, 2010 at 2:16 PM, Michael Ellis michael.f.el...@gmail.comwrote: Thanks, Nathan. That's certainly a possibility. It's just that I'm not sure what security issue this change actually fixes. There are no user-supplied strings in what I'm using

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-24 Thread Michael Ellis
:19 AM, mdipierro mdipie...@cs.depaul.edu wrote: This {{:=never_escaped}} would be the same as {{=XML(ever_escaped)}} so why introduce new syntax? On Jul 24, 7:14 am, Michael Ellis michael.f.el...@gmail.com wrote: I could happily live with a solution that adds a 'no escape' operator

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-24 Thread Michael Ellis
+kc}}).sparkline(data.wsc.{{=ks}}.{{=kc}}, {{=XML(schartoptions)}} /script If not, what are chartmin and chartmax, are they themselves helpers? On Jul 24, 7:28 am, Michael Ellis michael.f.el...@gmail.com wrote: Massimo, I'm not following you. I tried using XML (see earlier post) and it had

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-24 Thread Michael Ellis
search engine for tables, i am using JQGrid's local search (at latest version if JQGrid).It dont need server side at all for search to work, which make it a lot faster + lesser hit on server performance. On Sat, Jul 24, 2010 at 7:53 PM, Michael Ellis michael.f.el...@gmail.comwrote: My bad

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-24 Thread Michael Ellis
wrote: Should we have a JSON helper (same as you JD)? On Jul 24, 1:15 pm, Michael Ellis michael.f.el...@gmail.com wrote: Something good has come out of this: while looking for a workaround I learned about simplejson.dumps(). So now I've defined my own little helper JD() import

Re: [web2py] Re: Recent change to string escaping breaks dynamic javascript

2010-07-23 Thread Michael Ellis
}} after assigning the strings and before they are used in inside the script tags. The debug() calls show the strings with the single quotes unescaped, but they still end up being escaped in what gets sent to browser. On Fri, Jul 23, 2010 at 2:16 PM, Michael Ellis michael.f.el

Re: [web2py] Re: rocket performance issues

2010-07-22 Thread Michael Ellis
, signifying that web2py is not running any request. We need Tim! This is a problem. Massimo On Jul 22, 9:22 am, Michael Ellis michael.f.el...@gmail.com wrote: I've isolated the problem but absolutely do not understand it. I can reproduce it with a two-line change

[web2py] Problem trying to insert an image with CKEditor and SQLFORM

2010-06-21 Thread Michael Ellis
Not sure if this is a web2py or ckeditor problem or just some misunderstanding on my part. Here's what's happening: If I create a CKEditor instance in a SQLFORM, things work as expected until I try to insert an image. Clicking the Ok button in ckeditor's image dialog appears to be causing an