Re: [web2py] Re: Image Tutorial and linked_tables

2012-12-16 Thread Lanae
I have been going through the book tutorial verbatim, and ran into the same problem. I fixed it a different way, by commenting out this line, which the book has you add while creating db.py: db.comment.image_id.writable = db.comment.image_id.readable = False This now allows 'Comments' links to

Re: [web2py] Re: Image Tutorial and linked_tables

2012-12-16 Thread Massimo Di Pierro
Which web2py version? This was discussed some time ago and I believe the behavior was changed in 2.3.1. Can you please confirm? On Sunday, 16 December 2012 08:50:11 UTC-6, Lanae wrote: I have been going through the book tutorial verbatim, and ran into the same problem. I fixed it a different

Re: [web2py] Re: Image Tutorial and linked_tables

2012-10-27 Thread David Simmons
Hi Jim did as you said and that worked fine. Now all I need to do is work out why my app is not showing the same behaviour. Having one that works will be a big help. many thanks for your help. Dave --

Re: [web2py] Re: Image Tutorial and linked_tables

2012-10-26 Thread Jim Steil
Ok, I made a sample app from scratch. I added the db code to the default db.py and added the model to to default.py. Here is what I added to db.py: db.define_table('image', Field('title', unique=True), Field('file', 'upload'), format = '%(title)s') db.define_table('comment',

Re: [web2py] Re: Image Tutorial and linked_tables

2012-10-25 Thread Leonel Câmara
Can you tell me if this fixes it? @auth.requires_membership('manager') def manage(): db.comment grid = SQLFORM.smartgrid(db.image) return locals() Quarta-feira, 24 de Outubro de 2012 20:25:33 UTC+1, David Simmons escreveu: Hi Jim my model is: db.define_table('image',

Re: [web2py] Re: Image Tutorial and linked_tables

2012-10-25 Thread David Simmons
Hi Jim/Leonel tried both of your suggestions but still no luck. thanks Dave --

[web2py] Re: Image Tutorial and linked_tables

2012-10-24 Thread Leonel Câmara
What happens if you remove linked_tables=['comment'] ? As in using just: grid = SQLFORM.smartgrid(db.image) Terça-feira, 23 de Outubro de 2012 18:32:32 UTC+1, David Simmons escreveu: Hi I am following the image tutorial described in the online web2py book. I have the following code:

[web2py] Re: Image Tutorial and linked_tables

2012-10-24 Thread Jim S
Are you logged in? On Tuesday, October 23, 2012 12:32:32 PM UTC-5, David Simmons wrote: Hi I am following the image tutorial described in the online web2py book. I have the following code: @auth.requires_membership('manager') def manage(): grid = SQLFORM.smartgrid(db.image,

[web2py] Re: Image Tutorial and linked_tables

2012-10-24 Thread David Simmons
On Wednesday, October 24, 2012 3:37:17 PM UTC+1, Jim S wrote: Are you logged in? On Tuesday, October 23, 2012 12:32:32 PM UTC-5, David Simmons wrote: Hi I am following the image tutorial described in the online web2py book. I have the following code:

Re: [web2py] Re: Image Tutorial and linked_tables

2012-10-24 Thread Jim Steil
What does your model look like in regard to the two tables. -Jim On Wed, Oct 24, 2012 at 1:38 PM, David Simmons shortlypor...@gmail.comwrote: On Wednesday, October 24, 2012 3:37:17 PM UTC+1, Jim S wrote: Are you logged in? On Tuesday, October 23, 2012 12:32:32 PM UTC-5, David Simmons

Re: [web2py] Re: Image Tutorial and linked_tables

2012-10-24 Thread David Simmons
Hi Jim my model is: db.define_table('image', Field('title', unique=True), Field('file', 'upload'), format = '%(title)s') db.define_table('comment', Field('image_id', 'reference image'), Field('author'), Field('email'), Field('body', 'text')) I'm really hoping I'm

Re: [web2py] Re: Image Tutorial and linked_tables

2012-10-24 Thread Jim Steil
How about you try this: @auth.requires_membership('manager') def manage(): grid = SQLFORM.smartgrid(db.image) return locals() Just remove the linked_tables altogether. You shouldn't have to provide it. I typically leave it blank and only provide it when I'm trying to prevent others from