On Jun 20, 2006, at 2:57 AM, samuraisam wrote:

>
> I have a form:
>
> class X(widgets.WidgetsList):
>     blog = widgets.SingleSelectField(label="Blog", options=get_blogs)
>
> with a function:
>
> def get_blogs():
>     return [(blog.id, blog.title)
>                 for blog in identity.current.identity().user.blogs]
>
> turbogears.identity.exceptions.RequestRequiredException: An attempt  
> was
> made to use a facility of the TurboGears Identity Management framework
> that relies on an HTTP request outside of a request.
>
> What I need is a way to make it so I can dynamically add options to
> X.blog from /within/ a request. I imagine I can do this by
> manipulationg the TableForm object it's placed into, but even that is
> created /outside/ of a request. So, still, I need to create options my
> SingleSelectField on the fly from wthin the action. How, though? I  
> have
> gotten this far:

That sounds like a bug. That's exactly the point of passing in a  
callable: it should be resolved at request time.

Please file a bug report, if there isn't one already. Give it a 1.0  
milestone.

http://trac.turbogears.org/

Thanks!

Kevin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to