I understand the confusion now - yes, the field does not populate with
the path because the local path is not important to web2py and the
server path is not important to the regular user.  But it should not
error out on edit in any case.

You can look at the code for the appadmin for a good way to code this
or use the SQLFORM.grid which does this for you - but if the picture
is of primary importance, just showing it on the same page as the form
is a good way.

On Nov 3, 10:45 am, peter <peterchutchin...@gmail.com> wrote:
> I do not use validators.
>
> Looking at it again I realise that this is not a bug, but how the
> sytem works. It does not show the 'image'. I think it would be nice if
> it did display the filename, but I realise this is a feature request.
> However now it shows theimageit does not mislead one into thinking
> there is noimageloaded.
>
> Peter
>
> On Nov 3, 7:05 am, Casey Schroeder <vizqu...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I have not experienced this before, and i have done similar things,
> > but what do your validators look like?  I.E.
> > db.artists.image.requires=...
>
> > On Oct 31, 10:30 pm, peter <peterchutchin...@gmail.com> wrote:
>
> > > I define a table
>
> > > db.define_table('artists',
> > >                 Field('name'),
> > >                 Field('image','upload'),
> > >                 ..)
>
> > > I edit it it as follows
>
> > > @auth.requires_login()
> > > def edit_artist():
> > >     artist = db(db.artists.id==request.args(0)).select().first()
> > >    form= SQLFORM(db.artists, artist)
> > >     ifform.accepts(request.vars, session):
> > >         redirect(URL('artist', args=artist.name))
> > >     elifform.errors:
> > >         response.flash =form.errors.b
>
> > >     return(dict(form=form))
>
> > > However there is always a 'no file chosen message by theimagein the
> > > editform. Theimagedefinitely is defined as it appears correctly
> > > when the record is displayed.
>
> > > I can update theimageand the message goes away, but if I then try
> > > and edit the record again, I again get the 'no file chosen' message.
>
> > > Peter- Hide quoted text -
>
> > - Show quoted text -

Reply via email to