Re: [web2py] web2py recipe book

2012-03-12 Thread Jim Steil
I just ordered it and saw that it would be available on the 15th. I was going to order both hardcopy and electronic until I saw that shipping cost to the US was over $14. I just got the e-version. -Jim On 3/12/2012 8:49 AM, bussiere bussiere wrote: The cookbook is still labelled as pre

Re: [web2py] Getting started in Web2py

2012-03-23 Thread Jim Steil
This is a nice resource as well... http://killer-web-development.com/ -Jim On 3/22/2012 11:15 PM, SeamusJP wrote: Hi, I am developing a new project, new to python. Project is mainly for CRUD, display data on website, and easy management of back end. I started Djangobook and finished

[web2py] Link button text in smartgrid

2012-04-09 Thread Jim Steil
I updated to latest trunk this morning and am seeing additional text in the buttons for linked tables. Is there a way to disable this? I liked how I could just set the _plural for the table before to set the text that I wanted to appear. Now it appears to be appending 'for

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 when

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

[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. now,

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_form:}}

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

2012-04-10 Thread Jim Steil
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): FileC:\dev\web2py\gluon\restricted.py,line205,inrestricted execccodeinenvironment

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

2012-04-10 Thread Jim Steil
Yup, missed that, sorry again... On 4/10/2012 8:44 AM, Massimo Di Pierro wrote: Strange. It is saying grid.create_form is None. Make sure you have the custom form into a conditional: {{if grid.create_form:}} {{=grid.create_form.custom.begin}} {{=grid.create_form.custom.end}}

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 customize the

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

2012-04-18 Thread Jim Steil
Massimo I updated from trunk today and now I'm getting the following traceback: Traceback(most recent call last): FileC:\dev\web2py\gluon\restricted.py,line205,inrestricted execccodeinenvironment FileC:/dev/web2py/applications/InfoCenter/controllers/applications.py

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

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
Hi I'm looking for the most concise syntax to get a list of users that have a a certain permission. Here is what I have: groups = db((db.auth_permission.name=='load')(db.auth_permission.table_name=='railLoad'))._select(db.auth_permission.group_id) userids =

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

2012-04-19 Thread Jim Steil
it in your auth_user... I use this view for which I define a model, that offcorse can't be update... Richard On Thu, Apr 19, 2012 at 5:06 PM, Jim Steil j...@qlf.com mailto:j...@qlf.com wrote: Hi I'm looking for the most concise syntax to get a list of users that have

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

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

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

2012-04-19 Thread Jim Steil
I can get rid of this -Jim No virus found in this message. Checked by AVG - www.avg.com http://www.avg.com Version: 2012.0.1913 / Virus Database: 2411/4925 - Release Date: 04/09/12 -- Jim Steil VP of Information Technology Quality Liquid Feeds, Inc. 608.935.2345 office

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
/ 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 j...@qlf.com mailto:j...@qlf.com wrote: No, I'm

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

2012-04-20 Thread Jim Steil
the right path. -Jim On 4/20/2012 8:54 AM, Johann Spies wrote: On 20 April 2012 15:37, Jim Steil j...@qlf.com 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 specific permission

[web2py] MySQL issues

2012-04-24 Thread Jim Steil
Hi I've recently updated my MySQL test server to version 5.1.61 on Ubuntu. In my db.py I specify my field names with mixed case. In my.cnf I have: lower-case-table-names = 1 In the past this has always worked for me. But today, once I upgraded MySQL, I'm getting the following on any

Re: [web2py] SQLFORM.grid edit form

2012-05-01 Thread Jim Steil
I see a couple ways to handle it. 1. Using a custom view, wrap the button html with an if statement testing to see if request.args(1) == 'edit'. If so, then you are in the edit form for the grid. 2. Specify a custom view based on request.args(1) == 'edit' and then code the entire thing using

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

2012-05-01 Thread Jim Steil
Hi In a prior version of web2py (probably within the last 6-8 months) there were icons included on the default buttons use on the grid. The edit button had a little pencil and the delete had a trash can, etc. I just started a new app this week, and now they aren't there. Seems to me like

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 broke it as a I moved

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 for trunk? How

[web2py] Display text in SELECT list

2012-05-07 Thread Jim Steil
Hi I am having trouble getting my list to display the way I want it to. Given the following definition: --- helpdeskTech = db.define_table('helpdeskTech', Field('helpdeskTechId', 'id', readable=False), Field('helpdeskId', db.helpdesk, required=True,

Re: [web2py] Display text in SELECT list

2012-05-07 Thread Jim Steil
://db.auth_user.id == rows.first().id)|(db.auth_user.id http://db.auth_user.id == rows.last().id)) IS_IN_DB(auth_user_set,...) Richard On Mon, May 7, 2012 at 4:37 PM, Jim Steil j...@qlf.com mailto:j...@qlf.com wrote: Hi I am having trouble getting my list to display the way I want

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

2012-05-08 Thread Jim Steil
My problem is the opposite. All of my tables now have BIGINT for the id columns. The SQL generated today is now creating them with INT columns and the reference fields are also being created with INT. When I changed the SQL (using an outside SQL tool) from using INTs to BIGINTs it all

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

Re: [web2py] Display text in SELECT list

2012-05-08 Thread Jim Steil
7, 2012 at 5:09 PM, Jim Steil j...@qlf.com mailto:j...@qlf.com wrote: Sorry, not sure I follow. In my example, helpdeskTech is a subset of auth_user. My 'ticket' has a helpdeskTechId (in the assignedTo field), not an id from the auth_user

Re: [web2py] Display text in SELECT list

2012-05-08 Thread Jim Steil
Anyone know if I can use a virtual field in my IS_IN_DB validator? -Jim On 5/8/2012 12:48 PM, Jim Steil wrote: Richard First off, thanks for all the help, I certainly appreciate it. I'm trying to work with the second suggestion below, but am having trouble as you suspected with getting

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

2012-05-08 Thread Jim Steil
In looking back, I think this is what got me. 1. When bigint_id=True became the default, my apps broke and I'm not sure why 2. To fix it, I created a blank db and let things auto-migrate to create new 3. I dumped the data from the original and imported to my new db 4. Then I recreated my

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

2012-05-08 Thread Jim Steil
Oh, it's no problem, I'm all good now. I was just trying to let you guys know how I got in this mess in hopes that you could prevent it in the future for others. -Jim On 5/8/2012 3:41 PM, villas wrote: Hi Jim Sounds like a bit of a tangle. However, I think you should be ok. I would

Re: [web2py] Re: MySQL issues

2012-05-09 Thread Jim Steil
Yes, that is what it turned out to be. You can refer to the discussion I appended to your initial notice on the BIGINT change. -Jim On 5/8/2012 11:56 PM, Massimo Di Pierro wrote: bigint types for ids perhaps? On Tuesday, 8 May 2012 07:04:35 UTC-5, Jim S wrote: Funny thing - After

Re: [web2py] Display text in SELECT list

2012-05-09 Thread Jim Steil
...@gmail.com mailto:ml.richard.vez...@gmail.com wrote: Since virtual field are calculated each query I don't think you can refer to them in IS_IN_DB as a table field... Could be a solution if it works. Richard On Tue, May 8, 2012 at 2:10 PM, Jim Steil j...@qlf.com mailto:j

Re: [web2py] override smartgrid 'add' button

2012-05-10 Thread Jim Steil
I would really like to see an option to override the default Add button. I have a couple situations where I'd like to provide sort of a dropdown menu button there to give the option to add a couple different things. Kind of like what Outlook offers on the New button. Better yet would be to

Re: [web2py] my app not works with web2py 1.99.7

2012-05-15 Thread Jim Steil
I'm seeing the same thing. Not working in row objects... On 5/15/2012 1:11 PM, Richard Vézina wrote: Not working in this context : rows = db().select(db.tab1.ALL) for r in rows: *r._id* # KeyError But this work : db[request.args(0)].FK_id.represent=\ lambda FK_id, record:

Re: [web2py] Re: tutorial

2012-05-15 Thread Jim Steil
Yes, you're missing the -- counter=...before the second arg you're passing: Your statement: return dict(message=hello, session.counter) should be return dict(message=hello, counter=session.counter) -Jim On 5/15/2012 1:16 PM, Gerald Klein wrote: outside of the string passed to the

[web2py] plugin_lazy_options_widget trigger event

2012-05-15 Thread Jim Steil
Hi I'm trying to use the plugin_lazy_options_widget to build a dependent select list. I have to fields on the screen, both with the IS_IN_DB validator and values available in the second depend on what is selected in the first. This widget from s-cubism seems like just the thing, but I

Re: [web2py] Re: plugin_lazy_options_widget trigger event

2012-05-17 Thread Jim Steil
Thanks Kenji - I was trying to do this with the default widgets provided by web2py. Thanks for the info though, I will go down this path when I get the time to dig deeper. -Jim On 5/16/2012 7:30 PM, kenji4569 wrote: Hi Jim, In puling_suggest_widget, trigger events are invoked from a js

Re: [web2py] SQL avg()

2012-05-17 Thread Jim Steil
I see sum, min, and max aggregates in the book at section 6.24.4, but no avg. But, using sum and count (from 6.21.3) you could get there. -Jim On 5/17/2012 1:25 PM, Richard Vézina wrote: Hello, How I can make an avg() aggregate with web2py? Richard

Re: [web2py] SQL avg()

2012-05-17 Thread Jim Steil
On 5/17/2012 1:38 PM, Richard Vézina wrote: Yeah, that's what I thought just after press send :) Richard On Thu, May 17, 2012 at 2:33 PM, Jim Steil j...@qlf.com mailto:j...@qlf.com wrote: I see sum, min, and max aggregates in the book at section 6.24.4, but no avg. But, using sum

Re: [web2py] SQL avg()

2012-05-17 Thread Jim Steil
Done http://code.google.com/p/web2py/issues/detail?id=803 -Jim On 5/17/2012 2:27 PM, Richard Vézina wrote: Maybe open a ticket and propose a patch!! Richard On Thu, May 17, 2012 at 3:09 PM, Jim Steil j...@qlf.com mailto:j...@qlf.com wrote: I just hacked a quick and dirty solution

Re: [web2py] SQLFORM.grid: sorting

2012-05-21 Thread Jim Steil
You can specify the sort order using the orderby parameter. But, I don't know how you get it to sort by the displayed value of a foreign key column. Ex: orderby = [~db.asset.acquiredOn, db.asset.assetTag, db.asset.description] ~ orders descending. -Jim On 5/21/2012 2:23 PM, Keith

Re: [web2py] Re: I keep getting the error: home.yearstring can't be null.

2012-05-21 Thread Jim Steil
This may be way off-base, but can you check your model to make sure the line you have below as: Field('year', 'string', requires=IS_NOT_EMPTY()), is not mistakenly typed as: Field('yearstring', requires=IS_NOT_EMPTY()), Also, for string fields you don't need to specify the type ('string'),

Re: [web2py] SQLFORM.grid: sorting

2012-05-21 Thread Jim Steil
Massimo - Is there a way to do it with a .smartgrid. I know the question wasn't on .smartgrid, but I'm using that extensively and too would like some sort of solution. -Jim On 5/21/2012 3:11 PM, Massimo Di Pierro wrote: foreign key. You can do a join. On Monday, 21 May 2012 14:49:06

Re: [web2py] Re: How to prevent delete of a row with SQLFORM.grid -

2012-05-23 Thread Jim Steil
FWIW - I'm seeing the same behavior. -jim On 5/23/2012 10:29 AM, François Delpierre wrote: ... working but I have a side effect : It looks like the Delete on a row is just removing the row from the screen, without full refresh of the page. So, the last line is always deletable, but in

Re: [web2py] Newbie Alert: A flow chart of how things happen

2012-06-07 Thread Jim Steil
. Checked by AVG - www.avg.com http://www.avg.com Version: 2012.0.1913 / Virus Database: 2433/5053 - Release Date: 06/06/12 -- Jim Steil VP of Information Technology Quality Liquid Feeds, Inc. 608.935.2345 office 608.341.9896 cell

Re: [web2py] Re: Inserting records using DAL outside of web2py

2011-06-03 Thread Jim Steil
performs validation with CRUD and SQLFORM. Doing a direct insert does not cause validation to be checked. Try using validate_and_insert() instead of insert(). -- Jim Steil VP of Information Technology Quality Liquid Feeds, Inc. 608.935.2345 office 608.341.9896 cell

[web2py] Change layout of CRUD forms

2011-06-10 Thread Jim Steil
Hi I'm looking for a way to modify the presentation of a CRUD form. Specifically I want the following: Name:INPUT_FIELD_FOR_FIRST_NAME INPUT_FIELD_FOR_LAST_NAME Address: INPUT_FIELD_FOR_ADDRESS City/State/ZIP: INPUT_FIELD_FOR_CITY, INPUT_FIELD_FOR_STATE, INPUT_FIELD_FOR_ZIP I've

Re: [web2py] Re: Change layout of CRUD forms

2011-06-10 Thread Jim Steil
Thanks, that's exactly what I missed going through the book. I'll work through this and see what I can come up with. -Jim On 6/10/2011 9:21 AM, Anthony wrote: Have you tried the method described here: http://web2py.com/book/default/chapter/07#Custom-forms? You can also create custom

[web2py] Am I understanding session correctly

2011-06-15 Thread Jim Steil
Hi I have a page with a jqgrid and my own search form. Nothing fancy, just an input box, submit button and clear button. I'm trying to implement so that the following can happen: * User enters search phrase and clicks submit - Grid is refetched displaying filtered results * User can

Re: [web2py] Re: Am I understanding session correctly

2011-06-15 Thread Jim Steil
Thank you for the explanation. -Jim On 6/15/2011 10:06 AM, Massimo Di Pierro wrote: You are correct with one exception... when calling services the session cookie is usually not passed therefore if you call functions using the call() action for services, they will not see and will not save

[web2py] Simple DAL question

2011-06-15 Thread Jim Steil
Hi New to web2py and DAL and some things are just not obvious, probably because I'm coming from SQLObject where things are done a bit differently. Here is my challenge, probably something everyone else here has already dealt with: Using the following auth tables: auth_user auth_group

Re: [web2py] Simple DAL question

2011-06-15 Thread Jim Steil
Exactly what I needed - Thanks much! -Jim On 6/15/2011 3:00 PM, Vasile Ermicioi wrote: group_query = db(db.auth_membership.group_id==4)._select(db.auth_membership.user_id) rows = db(db.auth_user.id.belongs(group_query)).select(db.auth_user.first_name,db.auth_user.last_name)

[web2py] Refreshing component

2011-06-16 Thread Jim Steil
Hi I have a component on my page that displays the auth_users that have membership the specific auth_group. I have some the following js to remove someone from a group: function deleteMembership(userId, groupId) { $.ajax({ type: POST,

Re: [web2py] Re: Refreshing component

2011-06-16 Thread Jim Steil
Massimo Thanks for the reply. I made the change you recommended. I can see that the function is called using firebug, but the component doesn't refresh. Would it have something to do with this running inside the component? -Jim On 6/16/2011 12:37 PM, Massimo Di Pierro wrote: Try

[web2py] Problem with 1.97.1??

2011-06-30 Thread Jim Steil
Hi I have an app I've been working on and upgraded my system to 1.97.1 today. Since then I'm getting the following with an AJAX call for json data: Traceback(most recent call last): Filegluon/restricted.py,line192,inrestricted

[web2py] PowerTable question?

2011-07-05 Thread Jim Steil
Not sure if this is the right place to ask questions about PowerTable, but I have 3. 1. Where to find the documentation, can't seem to locate it at http://powertable.blouweb.com/ 2. I want to enable clicking on a row to navigate to a URL containing the record key field. Can't seem to find

Re: [web2py] PowerTable question?

2011-07-06 Thread Jim Steil
/2011 4:55 PM, Jim Steil wrote: Not sure if this is the right place to ask questions about PowerTable, but I have 3. 1. Where to find the documentation, can't seem to locate it at http://powertable.blouweb.com/ 2. I want to enable clicking on a row to navigate to a URL containing the record key

[web2py] FORM helper - formstyle='table2cols'

2011-07-07 Thread Jim Steil
Hi Looking for help with form generation. I have: form = FORM(LABEL('Name', _for='permissionName'), INPUT(_type='text', __name='permissionName', _id='permissionName', _style=width:150px;, _class='listPanelRow'),

Re: [web2py] FORM helper - formstyle='table2cols'

2011-07-07 Thread Jim Steil
. Ctrl+U in most nav ;-) Richard On Thu, Jul 7, 2011 at 2:09 PM, Jim Steil j...@qlf.com mailto:j...@qlf.com wrote: Hi Looking for help with form generation. I have: form = FORM(LABEL('Name', _for='permissionName'), INPUT(_type='text', __name='permissionName

Re: [web2py] Re: FORM helper - formstyle='table2cols'

2011-07-07 Thread Jim Steil
Thanks for all the advice. SQLFORM has a lot little things built in that make it more attractive than just a form. I modified what I needed and now having it working with a little css in the component .load file. Thanks again, still playing with it but I think everything I need is there.

[web2py] Demystifying some web2py magic

2011-07-08 Thread Jim Steil
Hi I have a utility module that I use regularly where I put some of my application-specific helper functions. What is the proper way to import this to make it available in my controllers and views? I've tried the local_import in db.py but have seen references on this list that recommend

Re: [web2py] Re: Demystifying some web2py magic

2011-07-08 Thread Jim Steil
Fantastic, that is exactly what I was looking for! -Jim On 7/8/2011 2:20 PM, Anthony wrote: local_import should work, but you should now use regular import statements instead. If you want your modules reloaded automatically, do the following: from gluon.custom_import import track_changes

[web2py] Reference field not required

2011-07-11 Thread Jim Steil
', zero=('select product class group')) -- Jim Steil VP of Information Technology Quality Liquid Feeds, Inc. 608.935.2345 office 608.341.9896 cell

[web2py] Validator for one of the following is required

2011-07-12 Thread Jim Steil
Hi I have a contact table where I want to require that either the company name be entered, or that the first and last name be entered. Is there a validator for that? I can't seem to locate anything out of the box. -Jim

Re: [web2py] Re: Validator for one of the following is required

2011-07-12 Thread Jim Steil
thanks, I'll give that a run On 7/12/2011 1:38 PM, Anthony wrote: Check out https://groups.google.com/forum/?fromgroups#!topic/web2py/brCjq5LjeVw https://groups.google.com/forum/?fromgroups#%21topic/web2py/brCjq5LjeVw. On Tuesday, July 12, 2011 2:27:31 PM UTC-4, Jim S wrote: Hi

[web2py] display value in dropdown listbox

2011-07-12 Thread Jim Steil
Hi I have the following tables/relations: contact has a district that has a district manager contact table has a district id district table has an auth_user id when editing a contact I want my dropdown to display my district number and the name of the manager. How would I specify my

Re: [web2py] Help : SQLFORM.factory with multiple submit button ?

2011-07-13 Thread Jim Steil
PowerFormWizard? http://labs.blouweb.com/powerformwizard -Jim On 7/13/2011 9:27 AM, Patrick Installe wrote: Hello, I have series of forms with in final validation. I would like that the user could go forward and backward between forms. Quite classical. I use SQLFORM.factory which I

[web2py] Problem with CRUD using fancybox dialog

2011-07-15 Thread Jim Steil
Hi I have a component on my page that lists a few records. Clicking on a link in the list will take me to a new page where I can edit the record using standard crud. I want this edit page to appear in a modal dialog so I'm using the fancybox tool (http://fancybox.net) to display the link.

[web2py] list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
Hi Having another problem today with the following: table defined as: priceBackerItem = db.define_table('priceBackerItem', Field('priceBackerItemId', 'id'), Field('priceBackerId', db.priceBacker, required=True, label='Price Backer'), Field('itemType',

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
Found this one myself. Don't use 'list:string'. This is just a regular string field. On 7/15/2011 12:55 PM, Jim Steil wrote: Hi Having another problem today with the following: table defined as: priceBackerItem = db.define_table('priceBackerItem', Field('priceBackerItemId

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
,inmigrate_table Filegluon/dal.py,line4570,in__getitem__ KeyError:'itemtype' Thoughts? -Jim On 7/15/2011 1:05 PM, Jim Steil wrote: Found this one myself. Don't use 'list:string'. This is just a regular string field. On 7/15/2011 12:55 PM, Jim Steil wrote: Hi Having another problem today

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
,inmigrate_table Filegluon/dal.py,line4570,in__getitem__ KeyError:'itemtype' Thoughts? -Jim On 7/15/2011 1:05 PM, Jim Steil wrote: Found this one myself. Don't use 'list:string'. This is just a regular string field. On 7/15/2011 12:55 PM, Jim Steil wrote: Hi

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
I just went and recreated my db from scratch and then sync'd my old records over. No big deal this time... On 7/15/2011 2:15 PM, Jim Steil wrote: Did that already and couldn't find anything. On 7/15/2011 2:16 PM, Anthony wrote: Not sure about that -- check out http://web2py.com/book

Re: [web2py] Re: Problem with CRUD using fancybox dialog

2011-07-15 Thread Jim Steil
Hey, I think i got it working. Using fancybox I can specify to open in an iframe. When I do so, things react as you'd expect. I still have some work to do with formatting and flow, but I now have the updates working. Thanks again for helping out, without the help I don't think I could

Re: [web2py] Re: Problem with CRUD using fancybox dialog

2011-07-15 Thread Jim Steil
Ok, two last things stumping me now. 1. How do I reload my component using javascript 2. I have a CRUD form open in my iframe. When I click submit it want it to submit and if it updates, close the iframe. If not, redisplay with errors showing (it does this part already, just don't want to

Re: [web2py] Re: Problem with CRUD using fancybox dialog

2011-07-15 Thread Jim Steil
Thanks Anthony I'm out for the next 10 days but will get on this straight away when I get back. Thanks again for all the help. -Jim On 7/15/2011 5:09 PM, Anthony wrote: On Friday, July 15, 2011 5:42:43 PM UTC-4, Jim S wrote: Ok, two last things stumping me now. 1. How do I

[web2py] Modal edit using FancyBox and iFrame

2011-08-02 Thread Jim Steil
Hi I'm using fancybox to display a crud.update form in an iframe. When I click on submit the 'next' action displays in the same iframe as the crud.update form, as expected. What I want to do is have the 'next' action display in the main browser window. In reading about iframe, it appears

Re: [web2py] Modal edit using FancyBox and iFrame

2011-08-02 Thread Jim Steil
Hey, think I figured it out. I put this: base target=_top ...between the head element in my html for the iframe page. Now when the form is submitted, but the 'next' action is performed in the main page, not the iframe. -Jim On 8/2/2011 2:43 PM, Jim Steil wrote: Hi I'm using

[web2py] pre-populating form on crud.create

2011-08-03 Thread Jim Steil
Hi I'm trying the following: form = crud.create(db.tablename) form.vars.description = 'default value for description' ...but the default value for description isn't displayed in my form. Should this work? -Jim

Re: [web2py] Re: pre-populating form on crud.create

2011-08-03 Thread Jim Steil
Thanks, just what I needed. -Jim On 8/3/2011 10:46 AM, Anthony wrote: I don't think that method would work with Crud because the .accepts method is called within crud.create, which happens before your form.vars assignment. Instead, try: db.tablename.description.default = 'default value'

[web2py] Trigger javascript to run after components are loaded

2011-08-05 Thread Jim Steil
Hi I have a bunch of pages that load a number of components. On these pages I have a script that fires after the page is loaded that resizes a few things and places my footer where it should be. Unfortunately, this is all happening before my components are completely loaded and therefore

Re: [web2py] Re: Trigger javascript to run after components are loaded

2011-08-05 Thread Jim Steil
Thanks Anthony - should I be able to see that executing in firebug somewhere? I tested first by putting an alert in response.js and it worked. However, when I try to call my resize function I can't see it firing through firebug. Thoughts? -Jim On 8/5/2011 2:35 PM, Anthony wrote: You

Re: [web2py] web2py.com down?

2011-08-05 Thread Jim Steil
...same for me On 8/5/2011 3:07 PM, Nicolas Palumbo wrote: can't access no page in web2py.com

Re: [web2py] Problem with reference fields

2011-08-08 Thread Jim Steil
If the 'student' and 'contact' fields should each, individually, refer to a record in the auth_user table then I'd use: Field('student', 'reference auth_user'), Field('contact', 'reference auth_user'), ...at least that is what I'd try first... -Jim On 8/8/2011 2:58 PM, Richard

Re: [web2py] Re: Problem with reference fields

2011-08-08 Thread Jim Steil
Eric Do you also have student and contact tables defined? -Jim On 8/8/2011 3:33 PM, Eric Scott wrote: Thanks for your response, Richard and Jim. Richard, the traceback is in my original message, as is the problematic part of the model code. The error occurs with any view/controller -- I

[web2py] Date format in CRUD forms

2011-08-09 Thread Jim Steil
I'm sure I just missed this somewhere, but I can't find how to control the date format for date fields in CRUD-created forms. db.py driverUnit = db.define_table('driverUnit', Field('driverUnitId', 'id'), Field('driverId', db.driver, required=True, label='Driver'),

Re: [web2py] Re: Date format in CRUD forms

2011-08-10 Thread Jim Steil
Massimo Thank you for the reply. However, it still isn't working correctly for me. I think I may have explained the problem wrong. When I go in to edit a record, the date displays with the %m/%d/%Y format as I want. But, when I select a date from the calendar widget it places the date

Re: [web2py] Re: Date format in CRUD forms

2011-08-10 Thread Jim Steil
Thanks Anthony, that did the trick. I apologize for not stating my problem properly in the first post. -Jim On 8/10/2011 9:39 AM, Anthony wrote: The calendar widget date format is set in /views/web2py_ajax.html. Note, it is actually a translated string, so you can change it by adding it

Re: [web2py] Re: table, grid, smartgrid, getting better

2011-08-18 Thread Jim Steil
Is there a way to control which columns are displayed in the grid? Thanks! -Jim On 8/18/2011 12:51 PM, Massimo Di Pierro wrote: More examples SQLFORM.grid(db.mytable,query=db.mytable.somefield=='somevalue') SQLFORM.grid(db.mytable,deletable=False) # default True

[web2py] CRUD update in modal iframe

2011-08-24 Thread Jim Steil
Hi I have a crud.update that I'm displaying in a modal iFrame. This is working fine for me except when there is an error in the form and crud redisplays with the error message. This is opening outside the iFrame when I want it to load inside the iFrame. But, on submit, the next url should

Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil
to execute a javascript inside modal. window.parent.location = '' http://zerp.ly/rochacbruno Em 24/08/2011 17:55, Jim Steil j...@qlf.com mailto:j...@qlf.com escreveu: Hi I have a crud.update that I'm displaying in a modal iFrame. This is working fine for me except when there is an error

Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil
. However, now (as Bruno mentioned) when I submit my form the next url is loaded in the modal as well. I'm using CRUD in my modal window, how/where do I specify the window.parent.location='next url' as Bruno mentioned? Thanks again. -Jim On 8/25/2011 8:18 AM, Jim Steil wrote: Anthony

Re: [web2py] CRUD update in modal iframe

2011-08-25 Thread Jim Steil
would really be appreciated. I'm pulling my hair out on this one... -Jim On 8/25/2011 10:10 AM, Jim Steil wrote: Ok, found what was causing the problem. On my page that I'm loading in my modal window I was specifying a different view. This view had: base target=_top ...in the head

Re: [web2py] CRUD update in modal iframe

2011-08-30 Thread Jim Steil
the window.parent.location but I don't know where I'd specify this. Any help would be appreciated. -Jim On 8/25/2011 4:59 PM, Jim Steil wrote: It would appear that I can supply an 'onaccept' argument on a crud.create that is a function or list of functions to be executed after the record

  1   2   3   4   5   6   >