From: Simone Orsi <simah...@gmail.com>
Date: Thu, 04 Oct 2012 09:27:42 +0200
Local: Thurs, Oct 4 2012 3:27 am
Subject: Re: pyramid + deform: default values and values from request
ok, it look like I was too tired yesterday night :)
It doesn't work with default schema but with the deferred one it works Sorry for the noise :P
Anyway, I wonder if this should not be a default behaviour: if the form Wouldn't be useful?
On 10/04/2012 08:58 AM, Simone Orsi wrote:
> Hi all,
> I'm quite new to pyramid and deform and I'm trying to achieve > I have a simple schema-based form and I want the fields to get the > Here's the schema:
> class MySchema(colander.MappingSchema):
> where choices come from an external db trough sqlalchemy. The form > So, I tried the deferred approach [1] like this:
> @colander.deferred
> @colander.deferred
> class MySchema(colander.MappingSchema):
> I noticed that the request was not in 'kw' so I binded it to the schema:
> schema = schema.bind(choices=departments,
> Now I see the value into deferred_default call and I can get it using > I can't find any meaningful step in the docs... what am I missing?
> Versions: colander-0.9.8-py2.7, deform-0.9.5-py2.7, pyramid-1.3.3-py2.7
> Thanks,
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.
| ||||||||||||||