[web2py:28042] Google App Engine and get_by_key_name

2009-08-05 Thread Jim
I was (and am) very interested in web2py but I want to use GAE for hosting. One of the things that web2py didn't have was support for model.get_by_key_name Where it's possible to have a defined key_name - say an email address or a domain - it requires significantly less quota to get than to que

[web2py:28087] Re: Google App Engine and get_by_key_name

2009-08-06 Thread Jim
py before but now he's referencing /web2py so we'd get_or_insert('user:web2py') and add a ReferenceProperty to get_or_insert('user:jdeibele') On Aug 5, 1:53 pm, mdipierro wrote: > I am not sure what it does. Can you give us an example? > > Massimo > > On

[web2py:35049] Re: installing web2py on Ubuntu

2009-11-10 Thread Jim
Google App Engine requires 2.5 I'm sure web2py will work with just 2.6 installed if it really bothers somebody to install 2.5 On Nov 10, 8:32 am, salingrosso wrote: > But: why do you install python 2.5 and not the default 2.6? --~--~-~--~~~---~--~~ You received

[web2py:16660] Trailing slash

2009-02-21 Thread Jim
; I'm probably over-analyzing this but it seems like I'm treating the category as a directory and it should have a trailing slash. I've looked at the manual and this group and I'm still not sure if this is a CherryPi or web2py si

[web2py:16662] Re: Trailing slash

2009-02-21 Thread Jim
s a web2py issue. it will be fixed immediately. thanks for > reporting it. > > On Feb 21, 1:51 pm, Jim wrote: > > > I'm trying to do this: > > > /newest-messages/ > > > and that works fine. > > > /newest-messages/category > > > works fine

[web2py:/] Re: Trailing slash

2009-02-22 Thread Jim
em interchangeably and you now have a mess of 301 redirects to maintain. Thanks! On Feb 21, 2:15 pm, mdipierro wrote: > fixed on launchpad. Could you please give it a try? > > Massimo > > On Feb 21, 3:36 pm, Jim wrote: > > > As a PS, I'm not sure if it makes a

[web2py:16714] Re: Trailing slash

2009-02-22 Thread Jim
Works great! Thanks again. On Feb 22, 7:35 am, mdipierro wrote: > They should all work now. Sorry my first quick fix did not do the job. > I tested the new one (in launchpad) and it does the job. > > Massimo > > On Feb 22, 8:48 am, Jim wrote: > > > I've copie

[web2py:16811] Trailing slash in ajax search

2009-02-23 Thread Jim
I'm using the AJAX search example from the manual. def add_message(): response.title="Add Message" return dict(form=FORM(INPUT(_id='keyword', _onkeyup="ajax('add_issue_find', ['keyword'],'target');")), target_div=DIV(_id='target')) If I call this as "/ad

[web2py:16865] Can't pass formname to view

2009-02-24 Thread Jim
I'm attempting to use http://www.plus2net.com/html_tutorial/set-focus.php to set the focus to a search box for the user. However, I'm having problems because I can't pass the formname from the controller to the view. I can set it on the controller side but it does not show up on the view side.

[web2py:16940] Re: web2py on GAE step by step guide?

2009-02-25 Thread Jim
Thanks very much for writing the guide! I found it very helpful. I added a comment to http://mdp.cti.depaul.edu/AlterEgo/default/show/186 about editing the app.yaml to exclude directories. I now have myapp.appspot.com/myapp/default/index working and that's great. What I would like to do is ge

[web2py:17006] web2py.py on linux not using --port assignment

2009-02-26 Thread Jim
python web2py.py --port=8001 unpacking apps, this may take a few minutes... default applications are now installed web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2009 Version 1.56.4 (2009-02-23 09:43:44) Database drivers available: SQLite3 please visit: http:/

[web2py:17047] Re: web2py.py on linux not using --port assignment

2009-02-26 Thread Jim
s available: SQLite3, Postgre, MSSQL/DB2 > please visit: > http://127.0.0.1:8001 > use "kill -SIGTERM 5300" to shutdown the web2py > > > Can you give more info about your environ? > > On Thu, Feb 26, 2009 at 4:26 PM, Jim wrote: > > > > > python

[web2py:17095] web2py and GAE

2009-02-27 Thread Jim
Executive summary: 1. web2py needs to focus on appealing to newbies As we get more experienced, we hopefully can make contributions to make web2py better and better. If I'm in charge of maintaining a site that's already written, it's unlikely that I'll want to throw out PH

[web2py:17106] Re: web2py and GAE

2009-02-27 Thread Jim
5 seconds to load. My hope/expectation is that the sites get faster as they get more popular. more use of your app equals it getting deployed to more data centers. On Feb 27, 1:29 pm, mdipierro wrote: > Hi Jim, > > you raise many issues and I am not sure I am answering them all. > &g

[web2py:17126] Ubuntu 9.04 switches /usr/bin/python to python2.6 (from python2.5)

2009-02-27 Thread Jim
ls -ald /usr/bin/python lrwxrwxrwx 1 root root 9 2009-02-27 11:25 /usr/bin/python -> python2.6 Noticed this: :13: DeprecationWarning: the md5 module is deprecated; use hashlib instead 9.04 should be released in about 2 months, meaning that 2.6 will then be standard on Ubuntu. --~--~-

[web2py:17293] Re: Ubuntu 9.04 switches /usr/bin/python to python2.6 (from python2.5)

2009-03-01 Thread Jim
n in Python 2.6 although people have reported one > problem that seems to be due to a bug in the Python cgi module. > > Try use it and let us know if you encouter any problem. > > Massimo > > On Feb 27, 10:52 pm, Jim wrote: > > > ls -ald /usr/bin/python > > lrwxr

[web2py:17298] sharding counters

2009-03-01 Thread Jim
I'm working towards implementing on Google App Engine. Google stresses the importance of sharding counters in their environment. http://code.google.com/appengine/articles/sharding_counters.html Why? Well, Craigslist keeps a counter for their ads. Every time someone posts an ad, that counter

[web2py:17337] Re: sharding counters

2009-03-02 Thread Jim
ht answer. On Mar 1, 9:55 pm, Jim wrote: > I'm working towards implementing on Google App Engine.   Google > stresses the importance of sharding counters in their > environment.http://code.google.com/appengine/articles/sharding_counters.html > > Why?   Well, Craigslist ke

[web2py:17347] Re: sharding counters

2009-03-02 Thread Jim
that start with "test" and then total them. On Mar 2, 12:20 pm, mdipierro wrote: > Because it is > > counter = db(db.shards.name==shard_name).select() > > ;-) > > On Mar 2, 12:48 pm, Jim wrote: > > > Boiled down, my problem is this: > > > I want

[web2py:17349] fieldstorage() when using curl to post to form

2009-03-02 Thread Jim
In models/db.py SQLField( 'meta_description','text'), In controllers/default.py form=SQLFORM(db.domain,_method='POST') form.vars=request.vars db.domain.insert(**dict (form.vars)) curl -F 'name=flapdoodle.com' -F meta_descripti...@layout.html http://127.0.0.1:8002/ini

[web2py:17360] Re: fieldstorage() when using curl to post to form

2009-03-02 Thread Jim
each possible field, I can. But that's a lot more labor-intensive and error-prone. Every time you add or modify a field, you need to make sure it has a test. So as long as I'm the only one using it I'll probably do things on the sending end - make an empty file and upload @blank Or

[web2py:17361] Re: fieldstorage() when using curl to post to form

2009-03-02 Thread Jim
Thanks. That particular reference gives me an error message but I'll look more at the topic. On Mar 2, 2:44 pm, Wes James wrote: > On Mon, Mar 2, 2009 at 3:32 PM, Jim wrote: > > > > > > > Is there a way to get the FieldStorage out of there?  I only find one >

[web2py:17362] Re: sharding counters

2009-03-02 Thread Jim
; On Mar 2, 3:27 pm, mdipierro wrote: > I am lost here. I need to look up what "sharding" means. > > Massimo > > On Mar 2, 3:25 pm, Jim wrote: > > > Yes, but that gets me an exact match, right? > > > If I've sharded my counters the way Google is reco

[web2py:17551] Using IS_IN_DB with existing data

2009-03-05 Thread Jim
I want to bulk upload some data. What I've noticed in testing is that I had something like this: info=whatever,state=NJ,moreinfo=something I decided I better make sure the state is in standard format so I added db.data.state.requires=IS_IN_DB(db,db.us_states.state) If I edit that record via t

[web2py:17559] Re: Using IS_IN_DB with existing data

2009-03-05 Thread Jim
n a form where AK does come before AL. But yes, it would be nice to use the full names. On Mar 5, 11:00 am, mdipierro wrote: > we need more details. > > On Mar 5, 11:18 am, Jim wrote: > > > I want to bulk upload some data. > > > What I've noticed in testing is th

[web2py:17631] Re: new feature in trunk: services

2009-03-07 Thread Jim
OK, I'm a newbie. I'd like to use something like this, especially after wrestling this morning trying to get the RSS example from the manual working. Almost there but not quite. And using that example would mean adding code to every single function /application/controller/function/[R

[web2py:17828] Use form variables for more than one table at a time?

2009-03-10 Thread Jim
I'm really enjoying the power of SQLFORM. I would like to be able to use SQLFORM with two tables at once in a couple of different use cases: 1) I have fields in common between table1 and table2. I'm tracking these by hand but I'd like to control that via db.py for the app. So if I decide tab

[web2py:17829] Re: routes.py - I must be missing something

2009-03-10 Thread Jim
There's a slight typo when it starts up: it's looking for routes.py but says WARNING:root:URL rewrite is on. configuration in route.py when it should be routes.py Looking through the source code in / gluon it's clearly looking for routes.py so it's not a bug. On Mar 10, 10:45 am, NguyendHEX

[web2py:17952] routes_onerror in routes.py returns 303 but should return error code

2009-03-12 Thread Jim
Saw how to add a custom error message in this thread: http://groups.google.com/group/web2py/browse_thread/thread/834cbe25394e0d71/61f55eeb2432a6a8?lnk=gst&q=404#61f55eeb2432a6a8 That's what I want to do but if I use routes_onerror it returns 303: 127.0.0.1, 2009-03-12 13:30:55, GET, /myapp/defau

[web2py:17988] Re: routes_onerror in routes.py returns 303 but should return error code

2009-03-13 Thread Jim
and I'd like to her more > opinions on the topic. > > Massimo > > On Mar 12, 10:51 pm, mdipierro wrote: > > > Let me look into this. > > > Massimo > > > On Mar 12, 5:35 pm, Jim wrote: > > > > Saw how to add a custom error message in this

[web2py:18313] How to use raise HTTP(404, 'message') ?

2009-03-18 Thread Jim
I'm trying to do some checking on data input. Looking at the code in gluon I see there's a raise function that should return a 404 or 400 error code. I'm trying a fairly simple test: if ( prefix < 200 ): print prefix # comment for production

[web2py] Typo in admin/cron/expire_sessions.py

2010-09-01 Thread Jim Meyer
Line 18 has a transposition typo: logging.wanr('failure to stat %s: %s' % (filename,e)) Should be .warn, I think. --j

[web2py:17444] Re: Redirect after login in the new Auth module (tools.py)

2009-03-03 Thread Jim C
As a followup question, does the Auth support redirecting a login when email verification is enabled ( i.e. auth.settings.mailer=mail ) and the user has not yet verified their email? --Jim On Mar 3, 7:34 am, mdipierro wrote: > sorry, that is a left over variable. You should

[web2py:17819] Re: Session timeout

2009-03-10 Thread Jim C
On a separate but related session expiration issue, if you are using the Auth class, there is an error with the logout method. If your session has expired and you logout you will generate a ticket. --Jim --~--~-~--~~~---~--~~ You received this message because you

[web2py:18253] strange problem with FORMS

2009-03-17 Thread Jim C
I'm just learning web2py and I've got a simple example whose behavior I don't understand. I've got a page with a form on top that sets a session variable holding the default year. On the bottom of the page I've got an SQLTABLE where the records selected should be from the selected year. What I'

[web2py:18265] Re: strange problem with FORMS

2009-03-18 Thread Jim C
Hi Massimo, I'm using 2.5.1 that came with the Mac OS X distribution: web2py Version 1.58 (2009-03-10 10:51:30) --Jim On Mar 17, 11:21 pm, mdipierro wrote: > Are you using python 2.6 or 2.5? > > Massimo > > On Mar 18, 12:43 am, Jim C wrote: > > > I'm j

[web2py:18284] Re: strange problem with FORMS

2009-03-18 Thread Jim C
I'm running web2py.app On Mar 18, 1:01 am, Yarko Tymciurak wrote: > do you have the source distribution? > or are you running web2py.app? > > On Wed, Mar 18, 2009 at 2:12 AM, Jim C wrote: > > > Hi Massimo, > > > I'm using 2.5.1 that came with the Mac OS

[web2py:18291] Re: strange problem with FORMS

2009-03-18 Thread Jim C
just a small unrelated item, the line: session.bene_year = datetime.datetime.now().year should be session.bene_year = str(datetime.datetime.now().year) otherwise you'll get a type mismatch the first time you run this. On Mar 18, 7:48 am, Jim C wrote: > I'm running web2py.app

[web2py:18314] Re: strange problem with FORMS

2009-03-18 Thread Jim C
the default year records = SQLTABLE(db (db.beneficiary.year==session.bene_year).select(db.beneficiary.ALL), truncate='1024') return dict(form=form, records=records) On Mar 18, 11:10 am, mdipierro wrote: > I cannot reproduce this. Can you try > > session.bene_year =

[web2py:18369] Re: strange problem with FORMS

2009-03-19 Thread Jim C
I've found a solution. Thanks Yarko, for your suggestion. I downloaded the source and used the shell interface to explore the FORM object. The new working code is: def index(): import datetime # form sets the default year to work on if not session.bene_year: session.bene_y

[web2py] Possible typo in book

2010-12-21 Thread Jim Karsten
In web2py book, chapter 7 Forms and Validators, IS_IN_SET section, second paragraph, should this line: If you do not want a "choose one" option, set zero=False be: If you do not want a "choose one" option, set zero=None Jim Karsten

[web2py] Re: "Internal error" on every page, can't even access admin

2012-07-25 Thread Jim S
;t easy to read, but I was able to find my problem there. FWIW, this was on webfaction. -Jim On Wednesday, July 25, 2012 8:00:17 AM UTC-5, Alec Taylor wrote: > > I'm getting an annoying "Internal error" message on every page, with a > link to the ticket it issued.

[web2py] calling custom_store and custom_retrieve using parameters

2012-08-08 Thread Jim Gregory
'new_filename','string') ) All the examples (which are few) I have seen use: Field('file', 'upload', custom_store=store_file, custom_retrieve=retrieve_file) and set the parameters within the body of each function. I've tried repeatedly to set custom parameters within the Field call but get errors. -Jim --

[web2py] Re: calling custom_store and custom_retrieve using parameters

2012-08-16 Thread Jim Gregory
ugust 8, 2012 6:51:44 AM UTC-5, Anthony wrote: > > On Wednesday, August 8, 2012 7:09:37 AM UTC-4, Jim Gregory wrote: >> >> Can custom_store and custom_retrieve take parameters when they are called >> using Field, e.g.: >> db.define_table('table', >> Fie

[web2py] Re: calling custom_store and custom_retrieve using parameters

2012-08-16 Thread Jim Gregory
Never mind. I out the problem :) -Jim On Thursday, August 16, 2012 2:06:28 PM UTC-5, Jim Gregory wrote: > > Thanks, that is helpful. But the path does not seem to be passed in the > custom retrieve. > Field('file','upload', > uploadir='/path/to/folde

[web2py] hideerror in widget not working

2012-08-24 Thread Jim Karsten
I created a custom widget including an *INPUT* with a *hideerror=True*parameter. It did not hide error messages. To simulate: in model: class SimpleWidget(FormWidget): _class = 'string'

[web2py] Re: hideerror in widget not working

2012-08-26 Thread Jim Karsten
et without > any error. > > Anthony > > On Friday, August 24, 2012 3:30:02 PM UTC-4, Jim Karsten wrote: >> >> I created a custom widget including an *INPUT* with a >> *hideerror=True*parameter. It did not hide error messages. >> >> To

[web2py] KeyError: 'index_name`' when upgrading to 2.0.3

2012-08-30 Thread Jim Steil
_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty) auth_user.last_name.requires = IS_NOT_EMPTY(error_message=auth.messages.is_empty) auth_user.password.requires = [CRYPT()] auth_user.email.requires = [IS_EMAIL(error_message=auth.messages.invalid_email), IS_NOT_IN_DB(db, auth_user.email), IS_NOT_EMPTY(error_message=auth.messages.is_empty)] auth_user.id.readable = False auth_user._plural = 'Users' auth.settings.table_user = auth_user auth.define_tables() Anyone with any idea why this is happening? Seems to be when it is processing the auth_membership table. Happens on existing or new (empty, no tables) database. Will create auth_user and auth_group on clean db before it fails. -Jim --

[web2py] Re: KeyError: 'index_name`' when upgrading to 2.0.3

2012-08-30 Thread Jim S
Sorry, I had a debug line in db.py. The actual offending line there is 726. -Jim On Thursday, August 30, 2012 4:44:40 PM UTC-5, Jim S wrote: > > Hi – sorry if this gets there multiple times, but I’ve posted twice in the > past 6 hours and it hasn’t shown up yet: > > >

Re: [web2py] Re: KeyError: 'index_name`' when upgrading to 2.0.3

2012-08-30 Thread Jim Steil
Wow, I'm really losing it. I'm referring to line number 726 instead of 727 in C:\dev\web2py\gluon\dal.py in create_table. Sorry for the sloppy reporting. -Jim On Thu, Aug 30, 2012 at 5:25 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > In which file? A

[web2py] Problem upgrading to 2.0.2 -KeyError: 'index_name`'

2012-08-30 Thread Jim S
Getting this traceback: Traceback (most recent call last): File "C:\dev\web2py\gluon\restricted.py", line 209, in restricted exec ccode in environment File "C:/dev/web2py/applications/infocenter/models/db.py" , line 88, in

[web2py] KeyError: 'index_name`' when upgrading to 2.0.2

2012-08-30 Thread Jim S
Traceback (most recent call last): File "C:\dev\web2py\gluon\restricted.py", line 209, in restricted exec ccode in environment File "C:/dev/web2py/applications/infocenter/models/db.py" , line 88, in auth.define_tabl

Re: [web2py] Re: KeyError: 'index_name`' when upgrading to 2.0.3

2012-08-31 Thread Jim S
Thanks Massimo, that did the trick. I'm now on to my next error but will start a new thread. -Jim On Thursday, August 30, 2012 8:19:08 PM UTC-5, Massimo Di Pierro wrote: > > Can you check if this works now with trunk? > > On Thursday, 30 August 2012 18:05:34 UTC-5, Jim S wrot

[web2py] Upgrade to 2.0.x - AttributeError: 'Table' object has no attribute 'permissionid'

2012-08-31 Thread Jim S
me)s') File "C:\dev\web2py\gluon\dal.py", line 7047, in define_table table = self.lazy_define_table(tablename,*fields,**args) File "C:\dev\web2py\gluon\dal.py", line 7078, in lazy_define_table polymodel=polymodel) File "C:\dev\web2py\gluon\dal.py", line 721, in create_table elif field_type.startswith('reference'): File "C:\dev\web2py\gluon\dal.py", line 8122, in startswith raise SyntaxError, "startswith used with incompatible field type" SyntaxError: startswith used with incompatible field type Any ideas where to look for this one? -Jim --

Re: [web2py] Is 2.0.2 or 2.0.3 really a stable version?

2012-08-31 Thread Jim S
done nothing to deserve it. To Massimo and the rest of the team, Thank You. -Jim On Friday, August 31, 2012 7:46:29 AM UTC-5, Massimo Di Pierro wrote: > > We should have tested the osx and win more. This is my mistake. Other > minor issues are physiological. > Anyway, I believe all

Re: [web2py] Upgrade to 2.0.x - AttributeError: 'Table' object has no attribute 'permissionid'

2012-08-31 Thread Jim Steil
No, I made no changes to my code what-so-ever. -Jim On Fri, Aug 31, 2012 at 8:20 AM, Bruno Rocha wrote: > did you turned lazy_tables to True on your db definition? > > Bruno Rocha > http://rochacbruno.com.br > mobile > Em 31/08/2012 10:02, "Jim S" escreve

Re: [web2py] Upgrade to 2.0.x - AttributeError: 'Table' object has no attribute 'permissionid'

2012-08-31 Thread Jim S
Yes, that works for me. -Jim On Friday, August 31, 2012 8:36:51 AM UTC-5, Massimo Di Pierro wrote: > > I am using trunk (2.0.3). Your original code is correct. > > I cannot reproduce the issue. I tried: > > $ python web2py.py -S welcome -M -N > >>> link = db.def

[web2py] Re: 2.02 Table name in smartgrid changed...

2012-09-04 Thread Jim S
I'm having the same issue as well with second level display.... -Jim On Friday, August 31, 2012 9:59:38 AM UTC-5, Adi wrote: > > trunk works for the first level, but doesn't when i drill down into the > second level... (image attached) > > also it used to display al

[web2py] SQLFORM formstyle argument changes

2012-09-10 Thread Jim Karsten
The *SQLFORM formstyle* argument can change from a string to a function. For example: sqlform = SQLFORM(db.mytable, formstyle='table3cols') Now (sqlform.formstyle == 'table3cols') returns *False*. *sqlform.formstyle*is now a function named *formstyle_table3cols*. I haven't had any problems wi

[web2py] DAL format and represent outside of SQLFORM

2012-09-12 Thread Jim S
Given the following tables: formulaImport = db.define_table('formulaImport', Field('formulaImportId', 'id', readable=False), Field('fileName', length=256, required=True, label='File'), Field('sweptOn', 'date', required=True, label='Swept', default=datetime.datetime.today()), Field('imported

[web2py] Re: DAL format and represent outside of SQLFORM

2012-09-12 Thread Jim S
cellaneous\playground\dalOutside.py", line 28, in print db.formulaImportLine.formulaImportId.represent(x.formulaImportLineId) TypeError: () takes exactly 2 arguments (1 given) I'm kinda lost here now... -Jim On Wednesday, September 12, 2012 3:02:44 PM UTC-5, Massimo Di Pierro wrote: >

[web2py] MySQLdb prints warnings to stdout

2012-09-14 Thread Jim Karsten
I use MySQL and after upgrading to 2.0.x I see MySQL warnings from time to time printed to stdout. It appears they originate from MySQLdb. Here is a simple example of how to produce the warnings. db.executesql('DROP TABLE IF EXISTS non_existent_table') /path/to/2.0.8/web2py/gluon/dal.py:1653: Wa

[web2py] Re: MySQLdb prints warnings to stdout

2012-09-17 Thread Jim Karsten
http://code.google.com/p/web2py/issues/detail?id=1007 --

[web2py] Smartgrid Add button missing

2012-09-27 Thread Jim S
generated HTML and it isn't a CSS or HTML issue. Is it just me or are others seeing this behavior? -Jim --

[web2py] Re: Smartgrid Add button missing

2012-09-27 Thread Jim S
I found the problem has to do with the search_widget. I'm overriding the search widget with my own custom one. Doesn't make sense to me that the Add button should be part of the search widget though. I should be able to override the search widget without affecting the add button.

[web2py] Re: Smartgrid Add button missing

2012-09-27 Thread Jim Gregory
Do your smartgrid forms require you to be logged in? The add buttons won't show unless you're logged in... On Thursday, September 27, 2012 10:14:55 AM UTC-5, Jim S wrote: > > I just updated to the 2.0.9 (2012-09-26 12:45:50) this morning and now see > that all of my Add

[web2py] Re: Smartgrid Add button missing

2012-09-27 Thread Jim S
ed to the console portion of the page. Adding the line above fixes that. Could we get that added please? -Jim On Thursday, September 27, 2012 10:38:51 AM UTC-5, Jim Gregory wrote: > > Do your smartgrid forms require you to be logged in? The add buttons > won't show unle

Re: [web2py] Re: Smartgrid Add button missing

2012-09-27 Thread Jim Steil
xed it but I cannot push to github until later > today (damn firewall!). > > On Thursday, 27 September 2012 10:46:12 UTC-5, Jim S wrote: >> >> Yes, I'm required to login and am logged in. I found the problem and the >> fix is to insert this line: >> >> con

[web2py] Link button text in smartgrid

2012-04-09 Thread Jim Steil
7;for linked_table_linking_id_field_name' to the _plural for the table. Really hoping I can get rid of this.... -Jim

Re: [web2py] Re: Adding record via sqlform.smartgrid

2012-04-09 Thread Jim Steil
Sure - here are the model and controller method. The model is very long but only a handful of the fields will be enabled for editing at one time. Let me know if you have questions or need more info... Thanks -Jim - model - railLoad = db.define_table('railLoad',

Re: [web2py] Re: Link button text in smartgrid

2012-04-09 Thread Jim Steil
Ouch! Seems kind of heavy-handed for accommodating one use case.This takes my default display from this: ...to this: Is this open for discussion or alternative implementations? -Jim On 4/9/2012 10:33 AM, Massimo Di Pierro wrote: There is a reason for the new text. One table A may have

Re: [web2py] Re: Adding record via sqlform.smartgrid

2012-04-09 Thread Jim Steil
Massimo I found code of mine that is causing this issue. I apologize for the noise. -Jim On 4/9/2012 10:30 AM, Massimo Di Pierro wrote: Any chance you can post the controller and the model? On Monday, 9 April 2012 09:49:08 UTC-5, Jim S wrote: Hi I'm having a problem

Re: [web2py] smartgrids with references (auth_user)

2012-04-09 Thread Jim Steil
readable and writable need to be true on the submitted_by field. -Jim On 4/9/2012 11:44 AM, blackthorne wrote: I'm trying to make a smartgrid using a table that has references to other (auth_user). The smartgrid show up but it does not include the field where I reference the other

[web2py] customized edit for using .smartgrid

2012-04-09 Thread Jim Steil
Hi I want to customize the edit form of a .smartgrid the way that you can customize SQLFORM forms as specified in the manual under section 7.5. Is this possible? If so, what do I use in place of {{=form.custom.begin}}? How do I reference the form portion of the returned grid? -Jim

Re: [web2py] smartgrids with references (auth_user)

2012-04-09 Thread Jim Steil
That is exactly the way I always handle it. I leave everything enabled in the controller (except the id column) and control the readability/writability in the controller. -Jim On 4/9/2012 12:41 PM, blackthorne wrote: Thank you. Didn't know that applies to smartgrids as well.

Re: [web2py] Re: customized edit for using .smartgrid

2012-04-09 Thread Jim Steil
Thanks Massimo - I'll grab a fresh copy in the morning and give it a try. -Jim On 4/9/2012 3:58 PM, Massimo Di Pierro wrote: You should be able to customize the create and edit forms in the same way: {{if grid.create_form:}} {{=grid.create_form}} {{elif grid.update

Re: [web2py] Re: customized edit for using .smartgrid

2012-04-10 Thread Jim Steil
it forms in the same way: {{if grid.create_form:}} {{=grid.create_form}} {{elif grid.update_form:}} {{=grid.update_form}} {{elif grid.view_form:}} {{=grid.view_form}} {{else:}} {{=grid}} {{pass}} You need the current trunk because I just found an issue about this. On Monday, 9 April

Re: [web2py] Re: customized edit for using .smartgrid

2012-04-10 Thread Jim Steil
}} {{}} On Tuesday, 10 April 2012 08:31:55 UTC-5, Jim S wrote: I've tried: {{=grid.create_form.begin}} and {{=grid.create_form.custom.begin}} and both get me the same AttributeError: Traceback(most recent call last): File"C:\dev\web2py\gluon\res

Re: [web2py] Re: customized edit for using .smartgrid

2012-04-10 Thread Jim Steil
In the example below you specify grid.update_form for the edit action. But, my testing shows that this is actually grid.edit_form. Should it be renamed to 'update_form' for consistency with CRUD? -Jim On 4/9/2012 3:58 PM, Massimo Di Pierro wrote: You should be able to cus

Re: [web2py] Re: customized edit for using .smartgrid

2012-04-18 Thread Jim Steil
http://127.0.0.1:8000/admin/default/edit/InfoCenter/controllers/applications.py>,line1707,inrailUnloading form=grid.update_form AttributeError:'DIV'object has no attribute'update_form' on updates. This worked with trunk from the 9th. (although update_form was then edit_form).

Re: [web2py] Re: customized edit for using .smartgrid

2012-04-19 Thread Jim Steil
Just curious why you say I should use grid instead of smartgrid. I've been using smartgrid extensively for the relations to other tables. -Jim On 4/18/2012 9:20 PM, Massimo Di Pierro wrote: Thanks for checking this. I made one more change to trunk that should fix it. Please try it

Re: [web2py] Re: customized edit for using .smartgrid

2012-04-19 Thread Jim Steil
Massimo I think we need like 1617 changed from create_form = update_form = view_form = None to create_form = update_form = view_form = search_form = None -Jim On 4/18/2012 9:20 PM, Massimo Di Pierro wrote: Thanks for checking this. I made one more change to trunk that

[web2py] List of users with a specific permission

2012-04-19 Thread Jim Steil
'%(lastFirst)s', zero='...choose one...') What I'm doing is filtering a dropdown. Want to limit the selections to just the people with a specific permission. This way works, but seems like too much code for something in web2py. -Jim

Re: [web2py] List of users with a specific permission

2012-04-19 Thread Jim Steil
Richard Thanks for this, but I'm really trying to stay away from extra database coding. -Jim On 4/19/2012 4:17 PM, Richard Vézina wrote: If you use postgres this SQL could help if you just want something really quick : -- View: v_permission_summary -- DROP VIEW v_permission_su

Re: [web2py] Re: List of users with a specific permission

2012-04-19 Thread Jim Steil
No, I'm looking for a list of user ids. I don't want to filter by user id. -Jim On 4/19/2012 5:08 PM, Cliff wrote: Something like this: userQuery = ((db.auth_permssion.name=='load') & (db.auth_permission.group_id==db.auth_membership.group_id) &

Re: [web2py] Re: Link button text in smartgrid

2012-04-19 Thread Jim Steil
ke to see the original behavior restored to the link buttons in the breadcrumbs as well. Thoughts? -Jim On 4/9/2012 3:46 PM, Massimo Di Pierro wrote: Yes it is open for discussion. :-) we could have a flag to change the mode. What do other people think? we could have a template field

Re: [web2py] What would be the best way to generate a summary of the 'count(*) 'of all my database table columns?

2012-04-19 Thread Jim Steil
ion: 2012.0.1913 / Virus Database: 2411/4947 - Release Date: 04/19/12 -- Jim Steil VP of Information Technology Quality Liquid Feeds, Inc. 608.935.2345 office 608.341.9896 cell

Re: [web2py] Re: List of users with a specific permission

2012-04-20 Thread Jim Steil
That's not quite it either. This is checking for a group 'role' as opposed to looking for all users that have a specific permission (auth_permission). -Jim On 4/20/2012 2:27 AM, Johann Spies wrote: On 20 April 2012 03:07, Jim Steil mailto:j...@qlf.com>> wrote:

Re: [web2py] Re: List of users with a specific permission

2012-04-20 Thread Jim Steil
or getting me down the right path. -Jim On 4/20/2012 8:54 AM, Johann Spies wrote: On 20 April 2012 15:37, Jim Steil mailto:j...@qlf.com>> wrote: That's not quite it either. This is checking for a group 'role' as opposed to looking for all users that have a s

[web2py] MySQL issues

2012-04-24 Thread Jim Steil
the latest MySQL on Ubuntu? My other MySQL tools are working as you'd expect regardless of the case I use. -Jim

Re: [web2py] SQLFORM.grid edit form

2012-05-01 Thread Jim Steil
tions/railUnloading.html' form = grid.create_form if request.args(1) in ['edit']: response.view = 'applications/railUnloading.html' form = grid.update_form I then pass 'form' to the view and can use it as you would in the book exampl

[web2py] Icons in button on .grid and .smartgrid

2012-05-01 Thread Jim Steil
like there used to be a base.css in the views directory and that has been replaced with web2py.css. But, the icon sprite (I think that's what they are called) mappings are all gone. Can someone confirm this or tell me that I'm going about something incorrectly? -Jim

Re: [web2py] Re: Icons in button on .grid and .smartgrid

2012-05-01 Thread Jim Steil
Ok, I created the attached file (based on what used to be in base.css) and added the following line in my layout.html. response.files.append(URL('static','css/css3buttons.css')) It is again working. -Jim On 5/1/2012 11:36 AM, Massimo Di Pierro wrote: I probably b

Re: [web2py] Re: Icons in button on .grid and .smartgrid

2012-05-01 Thread Jim Steil
Not a problem for me at all. I just thought I'd separate it in case I didn't have the most recent from trunk. I haven't tested against the latest trunk. My version is from last week, 2012-04-24 08:39:47. -Jim On 5/1/2012 2:29 PM, Massimo Di Pierro wrote: Does this work

[web2py] Display text in SELECT list

2012-05-07 Thread Jim Steil
zero='...choose...') ticket.assignedTo.requires = IS_NULL_OR(IS_IN_DB(db, db.helpdeskTech, zero='...choose...')) ------- I want my IS_IN_DB validator in the last line to display the last name and first name from the auth_user table. But, what I'm getting is the helpdeskTechId field displaying. I'm wondering how I can refer back to the auth_user table to get the names to display in the dropdown instead of the helpdeskTechId without custom-coding the view. Thoughts? -Jim

Re: [web2py] Display text in SELECT list

2012-05-07 Thread Jim Steil
Tech table. Maybe I don't fully grok the IS_IN_DB and the way the parms work. I'll go back and look that over again. -Jim On 5/7/2012 3:59 PM, Richard Vézina wrote: auth_user_rows = db().select(db.auth_user.id <http://db.auth_user.id>) make a set : auth_user_set

[web2py] Re: MySQL issues

2012-05-08 Thread Jim S
n and all of a sudden my re-built database no longer worked. Same error as below. But, all of my old DBs started working again. Am I losing it, or did something change with the MySQL adapter and then change back with the latest release yesterday? -Jim On Tuesday, April 24, 2012 1:02:24 PM

[web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Jim S
x27;m wondering if something related to this post got reverted that caused my generated SQL to not use BIGINT now. Or, am I losing my mind? --> https://groups.google.com/forum/?fromgroups#!topic/web2py/nGB1nYlpHwA -Jim On Saturday, April 21, 2012 12:37:15 PM UTC-5, Massimo Di Pierro wrote: >

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Jim Steil
worked (with migrate=False, fake_migrate=True). I'm not passing anything to bigint_id in the connect string. I do want (and have) all my models using BIGINT now. Except for this new problem, all has been fine. -Jim On 5/8/2012 10:27 AM, Richard Vézina wrote: Jim, Try this : bigint_id=

Re: [web2py] Re: ATTENTION before upgrading to trunk....

2012-05-08 Thread Jim Steil
Well, that explains things quite nicely. I guess that is what I get for working with trunk all the time. This also explains what was happening to me the post I referenced below. -Jim On 5/8/2012 11:48 AM, Carlos wrote: Hi Jim, The default now is bigint_id=False, so try to pass

  1   2   3   4   5   6   7   8   9   10   >