On Fri, 2007-09-07 at 20:18 -0700, stoKes wrote:
> Hi im getting a little confused on the best way to populate a
> radiolist
>
> here is my controller.py
>
(snipped)
> coregroup =
> widgets.RadioButtonList(validator=validators.NotEmpty(),
> label="Corefiles")
>
You need to set coregroup.options to your list of (value,text) pairs.
To experiment interactively from your project root:
tg-admin shell
import controllers as myctrl
# the shell already has: from turbogears import controllers
# so you do NOT wind to stomp on the controllers name
ftpview = myctrl.FtpView()
ftpview.render()
# as necessary
reload(myctrl)
You will probably find it easier to pull the ftp_login and getFileList
methods out of Root (self is never really used). getFileList would be
rejiggered to return a list of pairs - perhaps your original intent
judging from the name.
--
Lloyd Kvam
Venix Corp
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---