From: Jeff Dairiki <dair...@dairiki.org>
Date: Sat, 7 Apr 2012 13:29:57 -0700
Local: Sat, Apr 7 2012 4:29 pm
Subject: Re: Accessing a beaker session object from within Deform fileuploadWidget's tmpstore
On Fri, Apr 06, 2012 at 08:54:40AM +0200, tonthon wrote: Use a deferred to construct the FileUploadWidget. See > I'm building a FileUploadTempStore to handle file upload with deform and > I'm wondering how to access my beaker session object. > It works using : > But since I ""shouldn't abuse thread locals"", I'm wondering how I http://docs.pylonsproject.org/projects/colander/en/latest/binding.html Here's an (untested and incomplete) example: @colander.deferred class MyUploadSchema(colander.Schema): upload_schema = MyUploadSchema() then, in your view logic (where you have access to the request object): schema = upload_schema.bind(request=request) Jeff You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||