You can't auto-fill a location of a file to upload. Imagine the security holes that would open up on the web. No, users have to select the file on their system.
On Tuesday, March 26, 2013 10:36:15 AM UTC-7, smoggy wrote: > > There is no view, it's rendered from the controller. > > About the upload, i'm sending in request.vars the location of the file to > upload, so the user does not have to input it manually. This is being > called from a backoffice program that will upload : an icon, a zip and a > screenshot, so this upload form filling is very convenient. > > Terça-feira, 26 de Março de 2013 14:02:47 UTC, Anthony escreveu: >> >> Can we see the view? >> >> Regarding pre-populating an upload field, what do you mean? Do you want >> to provide a default file, or do you somehow want to identify a file on the >> user's machine? >> >> Anthony >> >> On Tuesday, March 26, 2013 9:07:43 AM UTC-4, smoggy wrote: >>> >>> Hi Folks, >>> >>> So I cannot submit SQLFORM, even the simpler ones like the following. I >>> always get the "else:" that says "please fill the form" >>> I checked and it seems the code is alright and i can submit forms and >>> add content using the badmin plugin, so i'm kind of lost here. >>> >>> And another question, how can we pre-populate the upload field with >>> request.vars ? >>> >>> in models.py >>> >>> db.define_table('t_asd', >>> Field('id','id'), >>> Field('f_app',type='string', default='abc',label=T('Parent >>> App'),comment=T('The application or addon that will load this.')) >>> ) >>> >>> in controller.py >>> >>> @auth.requires_login() >>> def register_addon3(): >>> form = SQLFORM(db.t_asd) >>> if form.process().accepted: >>> print("Addon added, waiting for moderator approval to show on >>> the addon store.") >>> response.flash = 'Addon added, waiting for moderator approval to >>> show on the addon store.' >>> elif form.errors: >>> print("form has errors.") >>> response.flash = 'form has errors' >>> else: >>> print("please fill the form.") >>> response.flash = 'please fill the form' >>> return dict(form=form) >>> >>> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.