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
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
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
--
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',
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',
Hi Jim/Leonel
tried both of your suggestions but still no luck.
thanks
Dave
--
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:
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,
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:
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
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
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
12 matches
Mail list logo