Thanks, Upgrading solved the problem though the I was using a month old install, the book (at least the images) are much older so this really doesn't make sense...
On Oct 5, 10:19 pm, Anthony <[email protected]> wrote: > Are you using the current version of web2py? That syntax was only introduced > in the most recent version. > > > > > > > > On Wednesday, October 5, 2011 4:55:14 PM UTC-4, Guy Nesher wrote: > > > I want to add an upload form to a page (allow users to add > > attachments) > > I've basically copied the comment example (appears in chapter 3) but > > use an upload field (instead of text) however I'm getting the > > following error which doesn't really makes sense : > > "<type 'exceptions.AttributeError'>('SQLFORM' object has no attribute > > 'accepted')" > > > This is the code : > > > @auth.requires_login() > > def show(): > > project = db(db.project.id==request.args(0)).select().first() > > form = SQLFORM(db.file) > > form.project = project.id > > if form.process().accepted: > > session.flash = 'form accepted' > > return dict(project=project, form=form) > > > Can't figure out what I'm missing, this should be quite straight > > forward the . accepted appears in quite a few examples using this > > exact code

