[web2py] On a Smartgrid form is it possible to set create to False for parent nodes but true for child nodes

2013-03-11 Thread Michael Hall
My tables are: t_contact (the parent) t_paypal t_paypal_fails t_paypal_contacted All the child tables refer to the parents ID. I have a controller that looks like this: @auth.requires_login() def paypal_manage(): form = SQLFORM.smartgrid(db.t_contact,linked_tables=['t_paypal','t_paypal_fail

[web2py] Re: Extracting row id from url using request.args

2012-11-19 Thread Michael Hall
Hi Villas I like the idea of getting the ID from a var instead of args, however I am still not sure how to go about getting the ID of the current record I am viewing/editing in smartgrid. Forgive my noobishness. M On Monday, 19 November 2012 08:57:09 UTC, villas wrote: > > If you cannot contr

[web2py] Re: Extracting row id from url using request.args

2012-11-19 Thread Michael Hall
Hi Villas I like the idea of using a var instead of args but I am still uncertain of how I get the ID of the current record I am viewing/editing in smartgrid. Mike On Monday, 19 November 2012 08:57:09 UTC, villas wrote: > > If you cannot control the order of args, you could still look for an

Re: [web2py] Re: Extracting row id from url using request.args

2012-11-20 Thread Michael Hall
it using similar code to your link function but it seems you can only request the id of the current record using db.t_contact.id from within the parameters of your SQLFORM.smartgrid request. Its a dirty hack but it seems to work. Mike On Tuesday, 20 November 2012 07:15:22 UTC, Johann Spies

[web2py] Re: SQLFORM.grid join repeats parent's data in table.

2012-11-23 Thread Michael Hall
Hiya This works a treat thanks. Mike On Thursday, 22 November 2012 14:32:38 UTC, Alan Etkin wrote: > > > On Thursday, November 22, 2012 9:07:23 AM UTC-3, Michael Hall wrote:I > have the following code for my join in SQLFORM.grid: > > Perhaps you can pass something

[web2py] SQLFORM.grid joins and view/edit

2012-11-28 Thread Michael Hall
I have a SQLFORM.grid with a join, however when I insert, edit or update a record displayed in the grid I am only ever given a form for the parent table. What is the preferred method for creating insert, update and delete forms for a joined SQLFORM.grid? Common sense tells me that it is the met

[web2py] Re: SQLFORM.grid joins and view/edit

2012-12-17 Thread Michael Hall
Just bumping this as I am still struggling with view and edit for joined SQLFORM.grid's On Wednesday, 28 November 2012 11:17:36 UTC, Michael Hall wrote: > > I have a SQLFORM.grid with a join, however when I insert, edit or update a > record displayed in the grid I am only ever gi

[web2py] SQLFORM.Smartgrid and with parent table in Linked Tables

2013-04-29 Thread Michael Hall
I would like to have a smartgrid that references its parent table in linked_tables, what is the web2py way of doing this? I have found some help in this thread: https://groups.google.com/forum/?fromgroups=#!topic/web2py/vDGJdct550Q but the solution is a bit sketchy due to it modifying sqlhtml.p

[web2py] Re: SQLFORM.Smartgrid and with parent table in Linked Tables

2013-04-29 Thread Michael Hall
/Field>('pass_mark', 'text'), format = '%(name)s') On Monday, 29 April 2013 13:32:10 UTC+1, Michael Hall wrote: > > I would like to have a smartgrid that references its parent table in > linked_tables, what is the web2py way of doing this? I have found som

[web2py] Re: SQLFORM.Smartgrid and with parent table in Linked Tables

2013-04-29 Thread Michael Hall
/www.web2py.com/examples/global/vars/Field>('pass_mark', 'text'), format = '%(name)s') On Monday, 29 April 2013 13:32:10 UTC+1, Michael Hall wrote: > > I would like to have a smartgrid that references its parent table in > linked_tables, wh

[web2py] Re: DAL performance vs executesql

2013-06-24 Thread Michael Hall
Was there ever a fully working solution proposed or discovered for using executesql with grid and smartgrid? On Friday, 22 June 2012 07:54:05 UTC+1, pbreit wrote: > > I have an app where I pull down 5,000 records. I started with DAL and > db.item.ALL and it was taking around 4 seconds. I added 5

[web2py] Changelog for 2.6.3?

2013-09-18 Thread Michael Hall
Hiya Is there a changelog for 2.6.3 I just updated this morning and had an issue with an experimental virtual field for sqlform.smartgrid. I removed the field and everything worked fine and the overall speed of the app has improved. I am interested to know if you have removed this experimental

[web2py] Re: Trouble Updating to 2.6.4 from 2.5.1

2013-09-24 Thread Michael Hall
What worked for me when this happened was simply to download the latest source of the site and unzip it to my web2py folder thus overwriting the incomplete upgrade. I restart web2py or in the case of my webfaction server I restart apache which restarts web2py and then everything works as normal

[web2py] Selecting records that are not referenced by other records.

2013-09-24 Thread Michael Hall
I am not the most awesome SQL person and as such I am having trouble constructing a query I need. I have two tables in a database called "old". The parent table is called "members" and there is a child table called "courses". # old.define_table('members', Field('id'), Field('pro

[web2py] Re: Selecting records that are not referenced by other records.

2013-09-25 Thread Michael Hall
Hey guys this works a treat and I have learned something new. Thanks for the help. On Tuesday, 24 September 2013 11:16:52 UTC+1, Michael Hall wrote: > > I am not the most awesome SQL person and as such I am having trouble > constructing a query I need. > > I have two tables in a

[web2py] How do I post an image to web2py from HTML5 Canvas

2013-12-02 Thread Michael Hall
If I have the following model: db.define_table('user_images', Field('my_image', 'upload', label=T('My Image')), ) and In my rendered html view I have a canvas, the canvas has produced an image saved in the variable document.getElementById('canvas').src = dataURL; Underneath the i