Justin's solution is the way better, a good tip to optimize some of my code.
Thanks, Justin! On Nov 5, 2:12 am, andrei <[email protected]> wrote: > You can create dropdown with args=[] (empty list) > > And then in every request: > > form = stream_form() > form.files.args=getMpegFiles() > > On Nov 5, 1:15 am, Pyther <[email protected]> wrote: > > > > > > > > > Hello > > > Here is my code:http://paste.pocoo.org/show/286254/ > > > Basically I have this: > > > form.Dropdown( > > 'files', > > getMpegFiles(), > > description="Files" > > ) > > > Where getMpegFiles() returns a list of filenames. It seems as if the > > dropdown get rendered on the first run and then won't get updated > > until webpy restarts. How can I force the function to be called on > > every page load? Ideally I would like to allow users to add files to a > > directory and then the list get updated. > > > Thanks, > > pyther -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
