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 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: > > > I have the

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

2016-10-07 Thread Michael Ellis
> Em quinta-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

[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 El

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

2016-08-17 Thread Michael Ellis
ose. My > guess 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 conjunctio

[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 each

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

2014-02-14 Thread Michael Ellis
tly for "session.auth.user is not None" > in the body of the ajax action avoid unauthenticated users. > > > 2014-02-13 22:29 GMT+01:00 Michael Ellis > >: > >> That looks worth trying. Will I need to also remove the login_required >> decorator from my a

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

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 3:56:

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
> > > > 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(

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

2014-02-12 Thread Michael Ellis
is going to be filled 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

[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

[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

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

2013-04-11 Thread Michael Ellis
l 11, 2013 2:47:44 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 >>> >&

[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

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

[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 pa

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

2012-09-17 Thread Michael Ellis
) > > For "new" I have different problem since I can't restrict the dropdown > till othe values in the form are selected (in your case, looks like you can) > So I let default values be populated, but on submit I validate and return > error. > > Looking for su

[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 == db.p

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, Al

[web2py] Need help with impersonate

2012-09-15 Thread Michael Ellis
shell says I have 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.id>0).select() auth_user.id,auth_user.first_name,auth_user.last_name, ... 1,Michael,Ellis, ... *(me)* 2,John,Bigbooty, ... *and on

[web2py] Re: Customizing SQLFORM.grid element styles

2012-09-14 Thread Michael Ellis
other 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 rende

[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

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

2012-04-21 Thread Michael Ellis
On Sat, Apr 21, 2012 at 7:31 PM, Anthony 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 = db.t_cir

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 tab

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. Th

[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] Re: How can I reduce shell memory usage?

2012-01-03 Thread Michael Ellis
used module that > consume lots 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 wrote: > > Found some advice from Massimo in another thread. > > > >

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

2012-01-02 Thread Michael Ellis
quot;applications/welcome/databases", 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 do

[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 configuration

[web2py] How can I reduce shell memory usage?

2012-01-02 Thread Michael Ellis
04 getset_descriptor 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

[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 wrote: > On Fri, 11 Nov 2011 14:34:32 -0800 (PST) > Michael Ellis > wrote: > > > For a site like this, the CMS feature that'

[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 music

[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 consid

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

2011-10-12 Thread Michael Ellis
, Jonathan Lundell wrote: > On Oct 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 comma

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

2011-10-12 Thread Michael Ellis
k which came back ok. On Oct 12, 12:03 pm, Michael Ellis 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 &

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

2011-10-12 Thread Michael Ellis
believe the Linux maintainers decided to disable that just to get a little better performance :-( Yuck! On Oct 12, 10:59 am, Jonathan Lundell wrote: > On Oct 12, 2011, at 7:48 AM, Michael Ellis wrote: > > > > > > > > > > > Help! I'm running into a serious an

[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 attempts

[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 = d

[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 S

[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 s

[web2py] Re: SQLTABLE default numeric format

2011-08-19 Thread Michael Ellis
Thanks, Bruno. On Aug 18, 9:55 pm, Bruno Rocha 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 appl

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

2011-08-08 Thread Michael Ellis
to know if there's a better way. On Aug 7, 12:40 pm, Michael Ellis 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 sup

[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 syst

[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 wrote: > I'm running a background pr

[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 norma

[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")), Field('f_ch2_value_doubl

[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 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, > they're not show

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

2010-09-16 Thread Michael Ellis
ther) are > the most complex piece of code in web2py. Not the one I am most happy > with. If I were to re-do it I would redo it differently (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

Re: [web2py] accepts [was: misunderstandings]

2010-09-16 Thread Michael Ellis
. All of which explains why I 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 wrote: > On Sep 16, 2010, at 7:26 AM, Michael Elli

[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 d

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

2010-09-16 Thread Michael Ellis
> > though. > > I checked with firebug and indeed they have no expiration date, though > > reloading the page in firefox is not downloading any of those files > > that might not be true for all browsers. > > Are you possibly serving some of those files as URL references fr

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

2010-09-15 Thread Michael Ellis
> On Sep 15, 2010, 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: /f

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

2010-09-15 Thread Michael Ellis
;t want to have to version control anything outside my app's directory. Cheers, Mike On Wed, Sep 15, 2010 at 6:59 PM, Jonathan Lundell wrote: > On Sep 15, 2010, at 3:46 PM, Michael Ellis wrote: > > The error is reported by GAE Launcher, the test app you use before > deplo

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 wrote: > On Sep 15, 2010, at 2:53 PM, Michael Ellis wrote: >

[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: /(?P.+?)/static/(?P.+) static_files: applic

[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 incorp

[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 wrote: > Hi, > > I have this test case: > > 1. User regist

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

2010-08-31 Thread Michael Ellis
; 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 wrote: > > Hi all, > > > > First of all, a thousand thanks to Massimo and all the regulars o

[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 intr

[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 t

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

2010-08-28 Thread Michael Ellis
n Aug 28, 7:21 am, mdipierro wrote: > > No but cron does not work on gae either. On gae you can use taskque. > > > > On Aug 28, 7:25 am, Michael Ellis wrote: > > > > > Massimo, can the technique described in the book be used on GAE? > > > Thx, > > >

[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 wrote: > Thanks Massimo. > , > > 2010/8/27 mdipierro > > > > > > > Run the web server with -N (no cron) and run a separate backrgound > > process for cron. Anyway, there is no way to contr

[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: session.f

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

2010-08-23 Thread Michael Ellis
Did this work before? I do not think continuation was ever supported. > > Massimo > > On Aug 22, 2:13 pm, Michael Ellis wrote: > > In Version 1.83.2 (2010-08-15 02:10:01) > > > > this works: > > > > {{ > > for r in rows: > >

[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 also.

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

2010-08-19 Thread Michael Ellis
repository. Cheers, Mike On Thu, Aug 19, 2010 at 1:15 PM, mdipierro 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 wrote: > >

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

2010-08-19 Thread Michael Ellis
t from the ones without. I'm 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 wrote: > How about the new layout.html? > > On Aug 19, 1

[web2py] Solutions to a couple of IE layout problems

2010-08-19 Thread Michael Ellis
I've just spent an embarrassingly long time tracking down a couple of layout problems that surfaced when I started testing my app on Internet Explorer. Thought I'd offer the solutions that finally worked in case someone else hits the same snags. YMMV, as usual. The first has to do with the jQue

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

2010-08-17 Thread Michael Ellis
atus just because we asked and as you mentioned it works > well with Mercurial, our fav versioning system. > > In addition we use Eclipse which can be configured to Google Code / > Mercurial ... all for no cost so we find that it is a hard combo to > beat although it would be nic

[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 ca

[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 t

Re: [web2py] Re: Debugging view template logic

2010-08-02 Thread Michael Ellis
even being 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 > wrote: > > Ok, think I know what was going on: > > 1. I did have a miss

Re: [web2py] Re: Debugging view template logic

2010-08-02 Thread Michael Ellis
onathan Lundell wrote: > 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. &

[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 > > > > wrote: > > One of my views has a number

[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", l

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
are: > > ## problem, c, s, sc, wsc, problemid, currenthash, nparticipants > > bulbicon = URL (r=request > > , c="static", f="lightbulb32.png") > > gaugeicon = URL (r=request > > , c='static', f="gauge.png") &g

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
without On Thu, Jul 29, 2010 at 11:38 AM, mdipierro wrote: > with or without -N > > On Jul 29, 10:27 am, Michael Ellis wrote: > > No process leakage in instances I've been running since this morning. > Open > > file count appears stable, too. > > Chee

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
> On Jul 29, 7:55 am, Michael Ellis 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
t;gauge.png") ... Removing the colon at the end of the comment fixed it. * * On Thu, Jul 29, 2010 at 8:19 AM, Michael Ellis wrote: > Testing under way... > > (Iceberg, I'm running OS X 10.6.4) > > Cheers, > Mike > > > > On Thu, Jul 29, 2010 at 2:57 AM, mdi

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
ng > > in crontab. The admin and examples apps have the crontabs that are "as > > shipped" in v1.85. > > > > Cheers, > > Mike > > > > On Jul 27, 12:17 pm, Jonathan Lundell wrote: > > > > > On Jul 27, 2010, at 9:01 AM, Michael Ellis

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
e? > > On Jul 27, 11: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 = !ps ax | grep "web2py" > > pids = [r[0] for r in procs.fields()[0:-2]

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
e are a few chr 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 wrote: > On Jul 27, 2010, at 5:33 AM, Michael Ellis wrote: > > > This morning

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
my\ script.py 1 2 3 #*/1* * * * root "/tmp/my script.py" 456 #...@reboot root *default/preload Cheers, Mike On Tue, Jul 27, 2010 at 8:57 AM, mdipierro wrote: > Yet is being called. It is on by default. Try set cron=False at the > bottom of web2py.py > > On

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
or when that happens? On Tue, Jul 27, 2010 at 8:49 AM, Michael Ellis wrote: > Not using cron. > > > > > On Tue, Jul 27, 2010 at 8:43 AM, mdipierro wrote: > >> Ignore my previous email I see you are using 2.6 and the problem >> is with cron. I think the pro

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
Not using cron. On Tue, Jul 27, 2010 at 8:43 AM, mdipierro wrote: > Ignore my previous email I see you are using 2.6 and the problem > is with cron. I think the problem is a cron process that does not end > and keeps restarting. Are you using cron? > > On Jul 27, 7:33 am

Re: [web2py] Re: rocket performance issues

2010-07-27 Thread Michael Ellis
gt; > > 127.0.0.1, 2010-07-22 10:22:42, GET, /favicon.ico, HTTP/1.1, 400, > > > > > > 0.000497 > > > > > > 127.0.0.1, 2010-07-22 10:23:02, GET, /michealellistest/static/ > > > > > > superfish.js, HTTP/1.1, 304, 0.000914 #### locks chro

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 wrote: > > > > > Something good has come out of this: while looking for a workaround I > > > learned about simplejson.dumps(). So now I've

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

2010-07-24 Thread Michael Ellis
0 at 9:34 AM, Phyo Arkar wrote: > I am also doing more and more in JS for views. Even 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 per

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

2010-07-24 Thread Michael Ellis
gt;"""%(chartmin,chartmax) > > }} > > and later on I use the variables within a script tag, e.g. > > >/* <![CDATA[ */ >$("#{{=ks+kc}}").sparkline(data.wsc.{{=ks}}.{{=kc}}, > {{=XML(schartoptions)}} > > > If not, what are chartmi

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

2010-07-24 Thread Michael Ellis
Jul 24, 2010 at 8:19 AM, mdipierro 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 wrote: > > I could happily live with a solution that adds a &#

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

2010-07-24 Thread Michael Ellis
t; > I really wish we would put certain things such as this under a review > board > > so they don't get into web2py and break things! > > > > -- > > Thadeus > > > > On Fri, Jul 23, 2010 at 2:33 PM, MikeEllis >wrote: > > > > > Ty

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

2010-07-23 Thread Michael Ellis
tring) pass }} after assigning the strings and before they are used in inside the 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: Recent change to string escaping breaks dynamic javascript

2010-07-23 Thread Michael Ellis
XML("""{ > type: 'bar', >barColor: 'green', >chartRangeMin: '%d', >chartRangeMax: '%d' >} >"""%(chartmin,chartmax)) > }} > > and it won't be escaped. > > > On Jul 23, 12:39 pm, Mich

[web2py] Recent change to string escaping breaks dynamic javascript

2010-07-23 Thread Michael Ellis
I've got an app with views that generate jQuery code on the fly. This was all working fine until recently, i.e. sometime after 1.92. With more recent builds, single and double quotes in strings are now escaped and it breaks the javascript. Here's an example The view has (with much snipped out)

Re: [web2py] Re: rocket performance issues

2010-07-22 Thread Michael Ellis
gt; > > > It is also important that the times showed in the logs are the actual > > time when the data is being written in the logs. You can see firefox > > waiting for base.css, the server waiting to log base.css and nothing > > else is being printed during the wa

  1   2   >