Nice, a did't know about it. But I still have some problems... my
get_options need User information, that I retrieve from within
identity, but I don't think I can use identity while creating global
widget:
File "/var/www/Milenium-Control-System/mcs/modules/webPoint/webPoint.py",
line 37, in _getActualStatus
actualUser = User.get(identity.current.user.id)
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/identity/__init__.py",
line 52, in __getattr__
identity= self.identity()
File
"/usr/lib/python2.4/site-packages/TurboGears-0.9a6-py2.4.egg/turbogears/identity/__init__.py",
line 44, in identity
raise RequestRequiredException()
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
Any idea?
On 6/30/06, Alberto Valverde <[EMAIL PROTECTED]> wrote:
>
>
>
> Pass it a callable that returns fresh options on each request:
>
> def get_options():
> return [(art.id, art.name) for art in Article.select()]
> sf = SingleSelectField(options=get_options)
>
> HTH,
>
>
--
- Ulysses Almeida
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---