>>> help(SQLFORM)
Help on class SQLFORM in module gluon.sqlhtml:

class SQLFORM(gluon.html.FORM)
 |  SQLFORM is used to map a table (and a current record) into an HTML
form
 |
 |  given a SQLTable stored in db.table
 |
 |  generates an insert form::
 |
 |      SQLFORM(db.table)
 |
 |  generates an update form::
 |
 |      record=db(db.table.id==some_id).select()[0]
 |      SQLFORM(db.table, record)
 |
 |  generates an update with a delete button::
 |
 |      SQLFORM(db.table, record, deletable=True)
 |
....
 |  :param upload: the URL of a controller/function to download an
uploaded file
 |          see controller appadmin.py for examples
....

You need:

form = SQLFORM(...,upload=URL(r=request,f='download'))



On Sep 22, 9:44 pm, Jason Brower <encomp...@gmail.com> wrote:
> I have my controller like this...
> def article_manager():
>     if len(request.args):
>         articles = db(db.article.id==request.args[0]).select()
>     if len(request.args) and len(articles):
>         articles_form = SQLFORM(db.article, articles[0], deletable=True)
>     else:
>         articles_form = SQLFORM(db.article)
>     if articles_form.accepts(request.vars, session):
>         response.flash = 'Action Commited Succesfully'
>     elif articles_form.errors:
>         response.flash = 'Hmmm, something went wrong.'
>     all_articles = db().select(db.article.ALL, orderby=
> db.article.author)
>     return dict(articles_form=articles_form, all_articles =
> all_articles)
> But when I try to do an edit of an existing row. I don't see any file
> selected.
> Regards,
> Jason Brower
>
> On Tue, 2009-09-22 at 14:01 -0700, mdipierro wrote:
> > Can you be more specific?
>
> > On Sep 22, 12:39 pm, Jason Brower <encomp...@gmail.com> wrote:
> > > According to page 193 of the manual I should be able to edit a previous
> > > set of data in the database.  It all works except that it doesn't show
> > > the information about the image or other uplaod.  Simply blank.  Is
> > > there any way to fix this?
> > > Regards,
> > > Jason
>
>
>
>  Screenshot.png
> 228KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to