Re: [web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim Steil
Glad to hear On Wed, Mar 13, 2013 at 3:59 PM, Alex Glaros alexgla...@gmail.com wrote: Yeah, it worked great. Thanks Jim, Alex On Wednesday, March 13, 2013 1:36:31 PM UTC-7, Jim S wrote: ...and doesn't changing the _plural value of that table change it? It should! On Wed, Mar 13,

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Alex Glaros
can anyone point to any examples where there is a running count of detail records for each parent? Parent_one link_to_child 3 records Parent_two link_to_child 0 records Parent_three link_to_chile 10 records this is so that users don't have to click on the Parent_two link to find

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Derek
You'd add a virtual field for that. http://web2py.com/books/default/chapter/29/06#Virtual-fields On Wednesday, March 13, 2013 2:40:06 PM UTC-7, Alex Glaros wrote: can anyone point to any examples where there is a running count of detail records for each parent? Parent_one link_to_child

[web2py] SQLFORM.grid with default field values from parent SQLFORM and TOTAL for a column

2013-03-13 Thread Jeison Dück
Hello, all, I have those 3 models bellow: db.define_table('order', db.Field('customer', db.customer), db.Field('autor', db.auth_user), db.Field('created', 'datetime'), ) db.define_table('product', db.Field('name'), db.Field('value'), format='%(name)s' )

[web2py] Re: how to automatically get the parent primary key into the child foreign key?

2013-03-13 Thread Derek
The form factory would be the way to do this. You create a form which has both the parent information and the child information. You'd add in your if form.process().accepted: this: id = db.parent.insert(**db.parent._filter_fields(form.vars)) that id is now the ID of the parent record, which you

[web2py] Re: smartgrid: how to disable repeating parent ID in child record

2013-03-13 Thread Jeison Dück
Putting this, on controller - db.project_table.description.readable = False - before loading the Smartgrid component, does not work? It worked for me. Regards Jason On Wednesday, March 13, 2013 3:21:18 AM UTC-3, Alex Glaros wrote: In smartgrid, is there a way to keep the parent ID from

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-13 Thread Anthony
SQLFORM.factory creates a dummy DAL Table object with the fields submitted, so you cannot use duplicate field names, as they are illegal in DAL tables. Note, technically your form can have input elements with the same name, but once the values are submitted to the server, the values will be

[web2py] global variables and menu

2013-03-13 Thread pgilbert902
(newbie to both web2py and python - please be gentle) I am trying to use two menu selection items to control a view and I need guidance on the general strategy one should use. Intuitively (to me) this seems like it should be easy, but I have made various attempts, all of which fail in

[web2py] Re: MSSQL

2013-03-13 Thread Niphlod
can you please open an issue about this so it gets tracked ? On Wednesday, March 13, 2013 9:39:21 PM UTC+1, Derek wrote: As far as compatibility issues, sqlite, mysql, and postgres all support ISO8601 with an optional T. On Wednesday, March 13, 2013 1:28:30 PM UTC-7, Marian wrote: ISO

[web2py] Re: enable_record_versioning() - possible to update archive only after deletion?

2013-03-13 Thread Niphlod
use callbacks it's not automatic as the archive functionality (that basically sets smarts callbacks for you) but it's definitely accomplishable. http://web2py.com/books/default/chapter/29/06#before-and-after-callbacks On Wednesday, March 13, 2013 7:27:16 PM UTC+1, Lamps902 wrote: At

[web2py] Re: SQLFORM.grid in LOADed component Delete behavior

2013-03-13 Thread Niphlod
I'd say that if you want a full reload after deleting the record you should disable the default delete and code your own (with redirect) using the links argument or intercepting earlier a request.args containing 'delete' . As for the sqlform in the other component, try to decouple and see

[web2py] Passing parameters to web2py using apache/mod_wsgi

2013-03-13 Thread Julien Courteau
How to pass command line parameters to web2py (such as -K) when using apache and mod_wsgi. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [web2py] Re: SQLFORM.grid in LOADed component Delete behavior

2013-03-13 Thread Jim Steil
That's what I was hoping to avoid, but probably the only way it is going to work. Thanks for taking a look. -Jim On Wed, Mar 13, 2013 at 6:15 PM, Niphlod niph...@gmail.com wrote: I'd say that if you want a full reload after deleting the record you should disable the default delete and

[web2py] Re: enable_record_versioning() - possible to update archive only after deletion?

2013-03-13 Thread Lamps902
Thanks, Niphlod! Will give it a go. -Lamps On Wednesday, March 13, 2013 6:12:41 PM UTC-5, Niphlod wrote: use callbacks it's not automatic as the archive functionality (that basically sets smarts callbacks for you) but it's definitely accomplishable.

[web2py] Re: SQLFORM.grid with default field values from parent SQLFORM and TOTAL for a column

2013-03-13 Thread Jim S
If you are in 'edit' mode in your SQLFORM.grid, set the default value for that field equal to the value for your order. if request.args(0) == 'edit': db.order_items.order_id.default = request.args(2) Place this BEFORE your grid = SQLFORM.grid(...) -- not tested -- -Jim On Wednesday, March

[web2py] Automated IP logging?

2013-03-13 Thread Lamps902
Is there an automated way to log the IPs associated with the initiatialization and clearing of each session (i.e. when a user logs in/logs out), or does this have to be accomplished manually through the use of request.client and some auth.settings variable (i.e. auth.settings.login_onaccept)?

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim S
...but you can't use them in .grid and .smartgrid. from the book... Mind that virtual fields do not have the same attributes as the other fields (default, readable, requires, etc) and they do not appear in the list of db.table.fields and are not visualized by default in tables (TABLE) and

[web2py] Re: REF: SQLFORM.smartgrid() changing the table labels

2013-03-13 Thread Jim S
Just re-read my post and saw that it says they aren't visualized by default. Does that mean there is a way to get them to be displayed? -Jim On Wednesday, March 13, 2013 8:42:33 PM UTC-5, Jim S wrote: ...but you can't use them in .grid and .smartgrid. from the book... Mind that virtual

<    1   2