[web2py:12357] Re: "No databases in this application" on GAE

2008-11-21 Thread mdipierro
On Nov 22, 1:05 am, sharekey <[EMAIL PROTECTED]> wrote: > I can insert and select records from GAE Development Console. and I > can insert record from > http://127.0.0.1:8080/myapp/appadmin/insert/db/mytable, > select record fromhttp://127.0.0.1:8080/myapp/default/index. But I > can not select

[web2py:12356] Re: "No databases in this application" on GAE

2008-11-21 Thread sharekey
I can insert and select records from GAE Development Console. and I can insert record from http://127.0.0.1:8080/myapp/appadmin/insert/db/mytable, select record from http://127.0.0.1:8080/myapp/default/index. But I can not select from http://127.0.0.1:8080/myapp/appadmin/select/db/mytable, I get

[web2py:12355] Re: session info not being returned?

2008-11-21 Thread mdipierro
Yes! That is the problem. Your session_data is 'text' while it should be 'bytea'. web2py is attempting a migration losing data and postgres does not allow copy text into a bytea. Massimo On Nov 22, 12:26 am, morningovermidnight <[EMAIL PROTECTED]> wrote: > Ok, with version 1.51 running I added

[web2py:12354] Re: session info not being returned?

2008-11-21 Thread morningovermidnight
Ok, with version 1.51 running I added the line to gluon/globals.py. Here's the message returned: Traceback (most recent call last): File "/home/basic/workbench/sites/newsite/gluon/restricted.py", line 62, in restricted exec ccode in environment File "/home/basic/workbench/sites/newsite/ap

[web2py:12353] Re: saving file in gui causes syntax error after

2008-11-21 Thread Wes James
svn version works fine now - thx :) On Fri, Nov 21, 2008 at 6:41 PM, mdipierro <[EMAIL PROTECTED]> wrote: > > Thank you Wes for insisting. You are right. The bug was reintroduced > when the "resolve conflict" feature was introduced. > I just reposted trunk and it should be fixed. > > Massimo > >

[web2py:12352] Re: session info not being returned?

2008-11-21 Thread mdipierro
I did a diff of 1.51 vs 1.47. As I remembered the only think that changed in session management is storing the pickle from 'text' to 'blob'. This actually fixed a problem with sessions in mysql, as pointed out by CJ. Please do a test for me. In gluon/globals.py replace these lines with:

[web2py:12351] Re: saving file in gui causes syntax error after

2008-11-21 Thread mdipierro
Thank you Wes for insisting. You are right. The bug was reintroduced when the "resolve conflict" feature was introduced. I just reposted trunk and it should be fixed. Massimo On Nov 21, 7:33 pm, "Wes James" <[EMAIL PROTECTED]> wrote: > But this is latest svn version. > > On 11/21/08, mdipierro <

[web2py:12350] Re: saving file in gui causes syntax error after

2008-11-21 Thread Wes James
But this is latest svn version. On 11/21/08, mdipierro <[EMAIL PROTECTED]> wrote: > > You have an old version of web2py with removes ALL trailing spaced. > If the last line is a comment it is a problem because python does not > like comments not ending in \n. > > This was fixed in 1.48 I believe.

[web2py:12349] Re: demo of checkbox issue

2008-11-21 Thread mdipierro
That is because a form is reset to default upon accept, unless you accept with keepvalues=True. Massimo On Nov 21, 5:41 pm, billf <[EMAIL PROTECTED]> wrote: > I have been going back to basics and running my own test - just web2py > - and I agree that it does all seem to work ok (correct data on

[web2py:12348] Re: saving file in gui causes syntax error after

2008-11-21 Thread mdipierro
You have an old version of web2py with removes ALL trailing spaced. If the last line is a comment it is a problem because python does not like comments not ending in \n. This was fixed in 1.48 I believe. Massimo On Nov 21, 5:36 pm, "Wes James" <[EMAIL PROTECTED]> wrote: > When a file is saved i

[web2py:12347] Re: itemize temporary data

2008-11-21 Thread mdipierro
we agree Bill. On Nov 21, 5:15 pm, billf <[EMAIL PROTECTED]> wrote: > I did suggest at the outset (18/11) that creating a new version of > itemize was probably the easiest solution :-). > > The in-memory database was just a response to "how can I pass data to > itemize?" - not a recommendation. >

[web2py:12346] Re: demo of checkbox issue

2008-11-21 Thread billf
I have been going back to basics and running my own test - just web2py - and I agree that it does all seem to work ok (correct data on db and correct data in form) with one exception (see next para). I think I overlooked the fact that, for standard form processing, update() only updates the field

[web2py:12345] saving file in gui causes syntax error after

2008-11-21 Thread Wes James
When a file is saved in the gui (i.e. db.py), i get a syntax error at the end of the db.py file as a ticket when i save a file with wingIDE this does not happen latest svn -wj --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[web2py:12344] Re: itemize temporary data

2008-11-21 Thread billf
I did suggest at the outset (18/11) that creating a new version of itemize was probably the easiest solution :-). The in-memory database was just a response to "how can I pass data to itemize?" - not a recommendation. On Nov 21, 10:18 pm, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote: > On Fri, No

[web2py:12343] Re: session info not being returned?

2008-11-21 Thread Wes James
btw, i'm using sqlite right now On Fri, Nov 21, 2008 at 3:48 PM, Wes James <[EMAIL PROTECTED]> wrote: > thx for the tip. This helped me get in to my app with latest svn > version. It had a session error otherwise. > > -wj > > On Fri, Nov 21, 2008 at 1:31 PM, kev <[EMAIL PROTECTED]> wrote:

[web2py:12342] Re: session info not being returned?

2008-11-21 Thread Wes James
thx for the tip. This helped me get in to my app with latest svn version. It had a session error otherwise. -wj On Fri, Nov 21, 2008 at 1:31 PM, kev <[EMAIL PROTECTED]> wrote: > > Try deleting all the session from the database. --~--~-~--~~~---~--~~ You receive

[web2py:12341] Re: session info not being returned?

2008-11-21 Thread mdipierro
Can you try using the sqlite database? Can you send me your app privately? Massimo On Nov 21, 4:25 pm, morningovermidnight <[EMAIL PROTECTED]> wrote: > Ok, I tried it out...removed the .table files, dropped the session > table, removed cookies, still same problem...nothing being returned > from

[web2py:12340] Re: session info not being returned?

2008-11-21 Thread morningovermidnight
Ok, I tried it out...removed the .table files, dropped the session table, removed cookies, still same problem...nothing being returned from sessions. Specifically, I have a login form. When the wrong username is entered, there is a session flash that says "invalid username". This doesn't show with

[web2py:12339] Re: Delete record

2008-11-21 Thread Yarko Tymciurak
On Fri, Nov 21, 2008 at 4:11 PM, mdipierro <[EMAIL PROTECTED]> wrote: > > Please check now. The DNS got messed up. +1 ;-) lookin' good! > > > Massimo > > On Nov 21, 4:03 pm, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote: > > yeah - I too am getting the eternal "...waiting on > mdp.cti.depaul.ed

[web2py:12338] Re: itemize temporary data

2008-11-21 Thread Yarko Tymciurak
On Fri, Nov 21, 2008 at 4:15 PM, mdipierro <[EMAIL PROTECTED]> wrote: > > The fact we can store a database in memory does not mean this is the > right solution to your problem. > > I would just take the code out of t2 itemize and adapt to your > purposes. It is relatively small. +1 > > > itemi

[web2py:12337] Re: svn version of web2py taking long time to log in

2008-11-21 Thread mdipierro
I need a patch to do the check of version in background using $.ajax so that this problem does not arise again. Massimo On Nov 21, 4:09 pm, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote: > yes - this must be slow note because of web2py, but > becausewww.web2py.com(forwhatever reason) is not respo

[web2py:12336] Re: itemize temporary data

2008-11-21 Thread mdipierro
The fact we can store a database in memory does not mean this is the right solution to your problem. I would just take the code out of t2 itemize and adapt to your purposes. It is relatively small. itemize does very very little for you so I doubt you need it. Massimo On Nov 21, 4:07 pm, Baron

[web2py:12335] Re: Delete record

2008-11-21 Thread mdipierro
Please check now. The DNS got messed up. Massimo On Nov 21, 4:03 pm, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote: > yeah - I too am getting the eternal "...waiting on mdp.cti.depaul.edu" > when trying to get towww.web2py.com > > On Fri, Nov 21, 2008 at 3:36 PM, kev <[EMAIL PROTECTED]> wrote:

[web2py:12334] Re: demo of checkbox issue

2008-11-21 Thread mdipierro
Good point. There is no way to get rid of the delete box in T2. we need a pacth! The exposes is in the t2 manual. At the end. On Nov 21, 3:40 pm, "Wes James" <[EMAIL PROTECTED]> wrote: > Massimo, > > thx, this works. I noticed with sqlform that I can do deletable=False > (i guess to get rid of

[web2py:12333] Re: svn version of web2py taking long time to log in

2008-11-21 Thread Yarko Tymciurak
yes - this must be slow note because of web2py, but because www.web2py.com(for whatever reason) is not responding. On Fri, Nov 21, 2008 at 3:50 PM, Wes James <[EMAIL PROTECTED]> wrote: > > ceej, > > Thx!! i also see a timout param in there. I added a 0 on to one of > the 60's as i've been bitten

[web2py:12332] Re: itemize temporary data

2008-11-21 Thread Baron
sorry, I may have my object types wrong. To summarize: I'm trying to pass data directly to t2.itemize() without having to write to a database. If I understood right, Bill was hinting that writing to an in-memory database was the easiest way, so I was wondering what was the harder alternative way

[web2py:12331] Re: Delete record

2008-11-21 Thread Yarko Tymciurak
yeah - I too am getting the eternal "...waiting on mdp.cti.depaul.edu" when trying to get to www.web2py.com On Fri, Nov 21, 2008 at 3:36 PM, kev <[EMAIL PROTECTED]> wrote: > > Hey, > Thanks for reply. I tested the site right now and it is still down. > (according to my internet and siteuptime

[web2py:12330] Re: session info not being returned?

2008-11-21 Thread morningovermidnight
I am using PostgreSQL, but I will try what you recommend and let you know how it works out. On Nov 21, 3:57 pm, mdipierro <[EMAIL PROTECTED]> wrote: > Are you using mysql? The problem may be a bug in web2py 1.47 that has > been fixed in an non-backward incompatible way. In 1.47 a session was > pi

[web2py:12329] Re: svn version of web2py taking long time to log in

2008-11-21 Thread Wes James
ceej, Thx!! i also see a timout param in there. I added a 0 on to one of the 60's as i've been bitten a few times with editting in the gui and click on save and it asks for the prompt to login and I lose my edits. I learned to log in and then back arrow to my edits and save them. This expire ch

[web2py:12328] Re: svn version of web2py taking long time to log in

2008-11-21 Thread ceej
It's because web2py checks web2py.com to see if your version matches with the latest version and Massimo just updated the server. In your app you can create a model named 0.py and add CHECK_VERSION=False to stop this :) On Nov 21, 1:34 pm, "mr.freeze" <[EMAIL PROTECTED]> wrote: > Yes, the trunk v

[web2py:12327] Re: demo of checkbox issue

2008-11-21 Thread Wes James
Massimo, thx, this works. I noticed with sqlform that I can do deletable=False (i guess to get rid of delete checkbox) How is this done with t2? Also, I looked for exposed and exposes in the t2/web2py manuals and I don't see these. -wj On Fri, Nov 21, 2008 at 1:47 PM, mdipierro <[EMAIL PROTE

[web2py:12326] Re: Delete record

2008-11-21 Thread kev
Hey, Thanks for reply. I tested the site right now and it is still down. (according to my internet and siteuptime) Kev On Nov 21, 3:49 pm, mdipierro <[EMAIL PROTECTED]> wrote: > I have moved the web site to a different virtual machine today. It > should be up now. > No. there is no delete record

[web2py:12325] Re: svn version of web2py taking long time to log in

2008-11-21 Thread mr.freeze
Yes, the trunk version last night was fast, but it is slow for me to login today. On Nov 21, 1:20 pm, "Wes James" <[EMAIL PROTECTED]> wrote: > Can anyone else verify if with the latest svn version of web2py if it > takes a long time to log in the admin area. > > it's doing it on mac pro and mac b

[web2py:12324] Re: demo of checkbox issue

2008-11-21 Thread Wes James
Oh! So when I use exposes on say 10 out of 20 fields then {{=form}} will only show those 10 fields and leave the other 10 alone - that would be good with the checkbox issue. How do I format my output then so =form does do its own table format? Is this what sqlform() does? On Fri, Nov 21, 2

[web2py:12323] Re: demo of checkbox issue

2008-11-21 Thread mdipierro
yes. rationale: T2 does a lot of stuff for you. db.table.exposes tells T2 which fields you want in forms. If you don't it assumes all fields. Yet you are manually extracting one field from the form object and placing only that one into the HTML form. web2py has no way of knowing that you are dis

[web2py:12322] Re: session info not being returned?

2008-11-21 Thread mdipierro
Are you using mysql? The problem may be a bug in web2py 1.47 that has been fixed in an non-backward incompatible way. In 1.47 a session was picked in a text field. In mysql text fields cannot be longer than 2**16 bytes. So since 1.48 they are pickled in a blob. Try 1.51 again but please drop the

[web2py:12321] Re: demo of checkbox issue

2008-11-21 Thread Wes James
I'm don't know why that is evil (would you explain?). Anyway, I'm using that to iterate through all the check boxes (and also place other components) on the page manually - so I can format their placement how I want. So the exposes will fix the checkbox issue? On Fri, Nov 21, 2008 at 1:47 PM,

[web2py:12320] Re: id=1 in form data

2008-11-21 Thread mdipierro
Wes, let's take this privately from now on. Some of your questions may confuse other people. The "id" is the "id" of the field you are editing {{form.record_id}}. You should let web2py give you values for fields, not hard code them in forms. Massimo On Nov 21, 2:36 pm, "Wes James" <[EMAIL PROT

[web2py:12319] Re: Delete record

2008-11-21 Thread mdipierro
I have moved the web site to a different virtual machine today. It should be up now. No. there is no delete record you have to do db(db.table.id==someobject.id).delete() Massimo On Nov 21, 2:29 pm, kev <[EMAIL PROTECTED]> wrote: > Hello, > Is there a way to do something like someobject.delete_

[web2py:12318] Re: session info not being returned?

2008-11-21 Thread morningovermidnight
Thanks for the reply. I tried deleting all sessions from the database, still did not solve the problem for me. In doing some investigation to solve the problem, I changed my web2py version from 1.51 to version 1.47 (replaced files with the 1.47 source). Now, everything works perfectly. Not sure if

[web2py:12317] Re: demo of checkbox issue

2008-11-21 Thread mdipierro
You are doing something evil in page1.html: {{=form[0][0][1]}} Anyway, given your custom forms and I assume you do not want to change them. you need to replace @t2.requires_login(next='login') def page1(): stus=db(db.student.id).select() if stus: form=t2.update(db.student,db.stud

[web2py:12316] id=1 in form data

2008-11-21 Thread Wes James
Also, I'm wondering; in the forms at the bottom you get something like this with a {{=form}}: is the id always 1 for the hidden id input field? I have this in my layout as static text and I'm wondering how that might change with different users. I did look at it with a different user and

[web2py:12315] Re: session info not being returned?

2008-11-21 Thread kev
Try deleting all the session from the database. On Nov 21, 2:51 pm, morningovermidnight <[EMAIL PROTECTED]> wrote: > I'm not sure what's happening. It was all working before. I was > storing sessions in the database and working with them throughout my > application with no problem. Now, it seems

[web2py:12314] Delete record

2008-11-21 Thread kev
Hello, Is there a way to do something like someobject.delete_record() just like someobject.update_record()? Also the website web2py.com seems to be down atm for me. Thanks, Kev --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Googl

[web2py:12313] demo of checkbox issue

2008-11-21 Thread Wes James
OK. Here is a demo of the checkbox issue: http://paste.pocoo.org/show/92051/ Put the code above in to a new app. Select page 2 and type some text in to the text box and select any number of checkboxes and click submit. Now go to page 1 and click on save Now go to page 2, you will see that th

[web2py:12312] session info not being returned?

2008-11-21 Thread morningovermidnight
I'm not sure what's happening. It was all working before. I was storing sessions in the database and working with them throughout my application with no problem. Now, it seems suddenly, sessions have stopped working. I don't get a session.flash or any other session objects returned. When I comment

[web2py:12311] Re: svn version of web2py taking long time to log in

2008-11-21 Thread Daniel Contag
Another glitch I noticed: The latest version in trunk occassionally displays the "newer version available" message. Daniel On Fri, Nov 21, 2008 at 20:20, Wes James <[EMAIL PROTECTED]> wrote: > > Can anyone else verify if with the latest svn version of web2py if it > takes a long time to log in

[web2py:12310] svn version of web2py taking long time to log in

2008-11-21 Thread Wes James
Can anyone else verify if with the latest svn version of web2py if it takes a long time to log in the admin area. it's doing it on mac pro and mac book pro that i just did itunes update - but i'm not sure that is what started this. thx, -wj --~--~-~--~~~---~--~~

[web2py:12309] Re: initial table data ?

2008-11-21 Thread achipa
Yes, I use something similar ATM, but I'm concerned about the overhead if you have a large number of tables... On Nov 21, 7:26 pm, mdipierro <[EMAIL PROTECTED]> wrote: > if not db(db.table.id>0).count(): db.table.import_from_csv_file(open > ('mytable.csv')) > > Massimo > > On Nov 21, 12:24 pm, ac

[web2py:12308] indexes

2008-11-21 Thread achipa
And while on a database migration topic, I would also very much welcome some index functionality. The easiest way to implement that in a backwards compatible way would probably to have an additional attribute in the sqlfield statement. Example: SQLField('name','string',index=True,indexlength=5)

[web2py:12307] Re: initial table data ?

2008-11-21 Thread mdipierro
if not db(db.table.id>0).count(): db.table.import_from_csv_file(open ('mytable.csv')) Massimo On Nov 21, 12:24 pm, achipa <[EMAIL PROTECTED]> wrote: > We have talked about this previously, but the CSV import/export in the > previous topic reminded me - wouldn't it be nice to have a sort of > SQL

[web2py:12306] initial table data ?

2008-11-21 Thread achipa
We have talked about this previously, but the CSV import/export in the previous topic reminded me - wouldn't it be nice to have a sort of SQLDefaultData('mytable.csv') entry in the model, which would contain the default contents of the table ? If the migrator decides it needs to create the table,

[web2py:12305] Re: odd save behavior with check box

2008-11-21 Thread Wes James
Sorry for all this hassle. I will do some more testing, but for now this is what I have working. On my first page I have: {{for cbi in range(26,76):}} {{pass}} I have hidden actual checkbox elements using css on the div (#hidethis{display:none;} The values are being kept now in all cases.

[web2py:12304] Re: odd save behavior with check box

2008-11-21 Thread mdipierro
I am sure there is no bug here. Wes, I suspect you are trying to reinvent something that exist but I cannot figure out what. If you just want to hide fields you can do: $(document).ready(function() { $('#tablename_fieldname__row').hide(); // list other fields... }); On Nov 21, 11:03 am, "Y

[web2py:12303] Re: need help running modules

2008-11-21 Thread shlo
thanks for directing me to look at the model. that is what was causing the problem... after trying to look at what was causing problems in my own model, i decided to see if it would work in other working applications. I uploaded reddish and added the test.py module and tried running the module. i

[web2py:12301] Re: odd save behavior with check box

2008-11-21 Thread Yarko Tymciurak
Wes - If you're doing things a "hard" way when there's a direct way, it would be nice for Massimo to point that out (and maybe that will help document something better); If there's a bug that we don't understand, then I'd like the loop to be closed so that can be addressed - either a patch from b

[web2py:12297] Re: odd save behavior with check box

2008-11-21 Thread Wes James
Yarko, so far, i can get it to work if the checkbox fields are not hidden on the form. My problem now is trying to make 'hidden' checkbox form elements. I don't see any way to hide checkbox elements. On Fri, Nov 21, 2008 at 9:39 AM, Yarko Tymciurak <[EMAIL PROTECTED]> wrote: > Wes - > > I thin

[web2py:12302] Re: odd save behavior with check box

2008-11-21 Thread Yarko Tymciurak
*sigh* On Fri, Nov 21, 2008 at 11:02 AM, Wes James <[EMAIL PROTECTED]> wrote: > > oh, i forgot, i can hide with css > > i'm going to try that. > > On Fri, Nov 21, 2008 at 10:00 AM, Wes James <[EMAIL PROTECTED]> wrote: > > Yarko, > > > > so far, i can get it to work if the checkbox fields are

[web2py:12300] Re: odd save behavior with check box

2008-11-21 Thread Wes James
i'll build a simple app with a text input and a couple of check boxs and see how that works. -wes On Fri, Nov 21, 2008 at 10:02 AM, Yarko Tymciurak <[EMAIL PROTECTED]> wrote: > Understood - but Bill thinks there's a bug, and is proposing patches; > Massimo is thinking perhaps you're doing someth

[web2py:12299] Re: odd save behavior with check box

2008-11-21 Thread Wes James
oh, i forgot, i can hide with css i'm going to try that. On Fri, Nov 21, 2008 at 10:00 AM, Wes James <[EMAIL PROTECTED]> wrote: > Yarko, > > so far, i can get it to work if the checkbox fields are not hidden on > the form. My problem now is trying to make 'hidden' checkbox form > elements.

[web2py:12298] Re: odd save behavior with check box

2008-11-21 Thread Yarko Tymciurak
Understood - but Bill thinks there's a bug, and is proposing patches; Massimo is thinking perhaps you're doing something wrong and no patch should be needed - having an example - even if you want to send privately to Massimo - would help close this disconnect. Thanks. On Fri, Nov 21, 2008 at 11:0

[web2py:12296] Re: odd save behavior with check box

2008-11-21 Thread Yarko Tymciurak
Wes - ... So your student table has boolean fields called "checkbox1", "checkbox2" and "checkbox3"? Those names sound off ... not like things that describe a student data record. I think we need more context. Something we can reproduce - complete example would really be useful at this point

[web2py:12295] Re: odd save behavior with check box

2008-11-21 Thread Wes James
if i put: db.student.exposes=['checkbox1','checkbox2','checkbox3','checkbox4'] in db.py then i get this error: Traceback (most recent call last): File "gluon/restricted.pyc", line 62, in restricted File "/Users/Shared/web2py.app/Contents/Resources/applications/cnrsa/views/default/profile.

[web2py:12294] Re: odd save behavior with check box

2008-11-21 Thread Yarko Tymciurak
Wes - I think we need a complete - if minimized example which others can use to reproduce. Can you provide? Thanks, Yarko On Fri, Nov 21, 2008 at 10:15 AM, mdipierro <[EMAIL PROTECTED]> wrote: > > SQLFORM(...,fields=[...]) > > should be used to determine which fields are expected and which sho

[web2py:12293] Re: odd save behavior with check box

2008-11-21 Thread mdipierro
SQLFORM(...,fields=[...]) should be used to determine which fields are expected and which should be ignored. For T2 use db.table.exposes=[] # list of field names Massimo On Nov 21, 9:52 am, billf <[EMAIL PROTECTED]> wrote: > Massimo > > I think there is a typo in your point 1) and it shou

[web2py:12292] Re: odd save behavior with check box

2008-11-21 Thread Wes James
well, this does not work either, I tried using the default value 'checked' then tried 'true', but when I save the form the value is not retained: {{for cbi in range(26,76):}} {{pass}} It seems that there is no such think as a hidden checkbox, because: when submitted does not keep its value,

[web2py:12291] Re: odd save behavior with check box

2008-11-21 Thread billf
Massimo I think there is a typo in your point 1) and it should read "update form and it was *checked* in the original record". The behaviour of the setting the checkbox value is not in question. I believe the problem Wes originally raised is that a boolean field on the database gets set to Fals

[web2py:12290] Re: odd save behavior with check box

2008-11-21 Thread mdipierro
You should not be doing that. You are clearly doing something wrong in the controller. Can you post the relevent parts of your controller and custom views? Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web

[web2py:12289] Re: odd save behavior with check box

2008-11-21 Thread Wes James
like this since the one line was an output line to let me see what was happending: {{for cbi in range(26,27):}} {{pass} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to th

[web2py:12288] Re: odd save behavior with check box

2008-11-21 Thread Wes James
This is how I have my fields set: SQLField("fieldname","boolean") I'll need to do what billf said, loop through my checkbox fields and set them as hidden. something like this: {{for cbi in range(26,27):}} {{=form[0][cbi][1][0]['_checked']}} {{pass} On Fri, Nov 21, 2008 at 7:10 AM, mdipierro

[web2py:12287] Re: Return only one dict to the view?

2008-11-21 Thread mdipierro
wait yes, a functions can return multiple objects in a tuple no, a controller action should not do that. an action returns a string (the web page) or a dictionary (defining the symbols exposed to the view). Massimo On Nov 21, 8:47 am, kaj <[EMAIL PROTECTED]> wrote: > Hi - and thanks for yo

[web2py:12286] Re: Return only one dict to the view?

2008-11-21 Thread kaj
Hi - and thanks for your reply; Yes, I realized this is a python issue, and found my python manual telling me that I could combine several dicts in the return statement by making a tuple out of them, just listing them one by one, separated by a comma. Regards, Kaj R. On Nov 21, 3:18 am, "mr.fre

[web2py:12285] Re: odd save behavior with check box

2008-11-21 Thread mdipierro
It was mentioned in one of the previous emails. I am not sure it helps with the current problem. I am not sure I understand the current problem. checkboxes are always unchecked unless: 1) update form and it was unchecked in the original record 2) create form and corresponding field has default=Tr

[web2py:12284] Re: odd save behavior with check box

2008-11-21 Thread billf
Massimo In what way are you suggesting "SQLFORM and and FORM take a parameter hidden=dict(key='value')" would be used? Bill On Nov 21, 2:10 pm, mdipierro <[EMAIL PROTECTED]> wrote: > Do you have default=False in the database? > > SQLFORM and and FORM take a parameter hidden=dict(key='value') >

[web2py:12283] Re: need help running modules

2008-11-21 Thread mdipierro
Yes you need the -M in order to call "print db.tables" but now we know that the bug is in your model file(s). If you post it we may be able to help. Massimo On Nov 21, 7:33 am, shlo <[EMAIL PROTECTED]> wrote: > taking out the -M works great, but i am now getting the following in > the traceback:

[web2py:12282] Re: odd save behavior with check box

2008-11-21 Thread mdipierro
Do you have default=False in the database? SQLFORM and and FORM take a parameter hidden=dict(key='value') Massimo On Nov 21, 6:32 am, billf <[EMAIL PROTECTED]> wrote: > I am investigating a possible solution to the above problem that would > return fieldname=OFF if a displayed checkbox is unche

[web2py:12281] Re: "No databases in this application" on GAE

2008-11-21 Thread mdipierro
That is not necessarily a problem. Do not trust appadmin on GAE. can you insert and select records? On Nov 21, 1:47 am, sharekey <[EMAIL PROTECTED]> wrote: > Hi Massimo, > Thank you very much, I get my answer from your point three of case > two(there are no tables either, until data is stored

[web2py:12280] Re: SQLFORM for multiple tables

2008-11-21 Thread mdipierro
You have the option of using form=SQLFORM and then form[0].insert(2,TR (...)) the rows from the other table. It may be easier to create the form using form_factory. Massimo On Nov 21, 12:34 am, mmstud <[EMAIL PROTECTED]> wrote: > Im thinking to create an insert and update form with fields taken

[web2py:12279] Re: need help running modules

2008-11-21 Thread shlo
taking out the -M works great, but i am now getting the following in the traceback: global name 'db' is not defined this is my revised module: import time try: while 1: time.sleep(60) print db.tables except Exception,e: print e thanks again! On Nov 20, 9:44 pm, mdipier

[web2py:12278] Re: odd save behavior with check box

2008-11-21 Thread billf
I am investigating a possible solution to the above problem that would return fieldname=OFF if a displayed checkbox is unchecked. This would enable web2py to retain existing values for a boolean field if a request.var was not present. However, I recognise that some people may consider returning

[web2py:12277] Proposed patch for check box behaviour

2008-11-21 Thread billf
The following is a proposed patch to sqlhtml.py so that record fields of type 'boolean' are added as hidden form fields if they are not already included in the form. In this way, the status of a checked/ true field is maintained even if the field is not included in the form as a checkbox. In the

[web2py:12276] Re: odd save behavior with check box

2008-11-21 Thread billf
If the following explanation is correct it is a big coincidence because I have just been looking at this behaviour. When a form is submitted, if there is no parameter for a field then one of 2 things happen (simplified): If it is NOT a checkable form control (checkable=check box or radio button)