#849: [PATCH] error info messages within a form
----------------------------------+-----------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: FastData | Version: 0.9a5
Severity: normal | Resolution:
Keywords: |
----------------------------------+-----------------------------------------
Comment (by Jiri Popek <[EMAIL PROTECTED]>):
Thanks, it works using validator=Int()... Finally-what is necessary for
MultipleSelectField to automatically selelect items according to
RelatedJoin values?
{{{
class Genre(SQLObject):
titles = RelatedJoin('Title')
class Title(SQLObject):
genres = RelatedJoin('Genre')
def get_all_genres():
return [(int(a.id), "%s" % a.name) for a in Genre.select()]
FORM:
genres = MultipleSelectField(name='genres', options=get_all_genres,
label=_('Genres'), validator=Int())
}}}
Thank you
Jiri
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/849>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" 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-tickets
-~----------~----~----~----~------~----~------~--~---