Source version of windows binary version? (the latter is not supposed to work yet)
On Saturday, 21 July 2012 16:43:22 UTC-5, david.waldrop wrote: > > Massimo, I tried to install nightly build, but have encountered an > error. I get a message when i run web2py that zipimport.zipimorterror: > can't find module 'gluon' > > i am running on win7 today > > this is my 1st time getting the nightly build. i simply copied the > structre over the top of my existing web2py directory > this did not work, so i went in and deleted all the files in the root of > web2py and manually moved them form the downloaded nightly build. > > Is there something else I can try? > > Massimo Di Pierro <[email protected]> > Saturday, July 21, 2012 2:17 PM > You are using web2py stable. groupby is only in trunk. In 5 minutes, try > the nightly build. > > > > On Saturday, 21 July 2012 12:35:55 UTC-5, david.waldrop wrote: > -- > > > > david.waldrop <[email protected]> > Saturday, July 21, 2012 1:35 PM > Massimo, it does not accept the groupby in theSQLFORM.grid. > > 1 > 2 > 3. > 4. > 5. > 6. > 7. > 8. > Traceback (most recent call last): > File "gluon/restricted.py", line 205, in restricted > File "C:/Users/david/My > Projects/Miscelaneous/web2py/applications/COPSIS2_1/controllers/org.py"<http://127.0.0.1:8000/admin/default/edit/COPSIS2_1/controllers/org.py>, > > line 162, in <module> > File "gluon/globals.py", line 175, in <lambda> > File "gluon/tools.py", line 2679, in f > File "C:/Users/david/My > Projects/Miscelaneous/web2py/applications/COPSIS2_1/controllers/org.py"<http://127.0.0.1:8000/admin/default/edit/COPSIS2_1/controllers/org.py>, > > line 88, in orgs_grid > TypeError: grid() got an unexpected keyword argument 'groupby' > -- > > > > Massimo Di Pierro <[email protected]> > Saturday, July 21, 2012 1:31 PM > My bad. Try this: > > count = db.auth_user.id.count() > # bad hack > count._tablename = 'auth_user' > count.readable = True > count.represent = None > count.formatter = lambda value:value > # end bad hack > results= SQLFORM.grid(db.org, > fields=[db.org.name, db.org.jurisdiction, > db.org.otype, db.org.id, count], > left=db.org.on(db.auth_user.org_ref==db.org.id), > deletable=False, details=True, create=False, > editable=False, > orderby=db.org.name.upper(), groupby=db.org.id, > maxtextlength=50, paginate=20, csv=False, > searchable=False) > return dict(results=results) > > On Saturday, 21 July 2012 12:10:45 UTC-5, david.waldrop wrote: > -- > > > > david.waldrop <[email protected]> > Saturday, July 21, 2012 1:10 PM > Massimo, thanks, this made progress in that it now does't emit and error, > but only shows one row (instead of the 18 records in the table) and the a > count for the single row of 39 (which is the total # users in the system). > What I need is 18 rows, one for each org, and the # of users for each org > (typically between 1-10) with current data. > How does the grid know when to reset count??? > -- > > > > Massimo Di Pierro <[email protected]> > Saturday, July 21, 2012 1:03 PM > This syntax is not allowed: > > left=db.org.on(db.auth_user.org_ref==db.org.id).count() > > Try this instead: > > count = db.auth_user.org_ref.count() > # bad hack > count._tablename = 'auth_user' > count.readable = True > count.represent = None > count.formatter = lambda value:value > # end bad hack > results= SQLFORM.grid(db.org, > fields=[db.org.name, db.org.jurisdiction, > db.org.otype, db.org.id, count], > left=db.org.on(db.auth_user.org_ref==db.org.id), > deletable=False, details=True, create=False, > editable=False, > orderby=db.org.name.upper(), > maxtextlength=50, paginate=20, csv=False, > searchable=False) > return dict(results=results) > > > > On Saturday, 21 July 2012 11:41:24 UTC-5, david.waldrop wrote: > -- > > > > > --

