Hi David,
I tried what you said and it still does not work.
A default value is set if I change the controller to this:
reach=SingleSelectField("Reach", options=lambda: [(t.id, t.reach)
for t in Reach.select()], default=476)
but not if it is this:
reach=SingleSelectField(label="Reach", options=lambda: [(t.id,
t.reach) for t in Reach.select()], default=476)
Why would the inclusion of 'label=' mess up setting the default?
Anyway back to the original problem. I was thinking maybe my values
were not getting through so I changed the template to look like this:
${form(record,default=dict(reach=840),action=tg.url('%s/save?id=
%s&tg_paginate_limit=%s&tg_paginate_no=%s'%
(rootDir,str(record.id),tg_paginate_limit,tg_paginate_no)),
submit_text = "Edit")}
but no luck.
Is it me or is there something amiss in the framework? This is what I
am currently running in my environment:
TurboGears requires:
* TurboGears 1.0.2.2
* cElementTree 1.0.5-20051216
* configobj 4.4.0
* DecoratorTools 1.4
* RuleDispatch 0.5a0.dev-r2306
* setuptools 0.6c5
* FormEncode 0.7.1
* PasteScript 1.1
* elementtree 1.2.6-20050316
* simplejson 1.7.1
* CherryPy 2.2.1
* TurboKid 1.0.1
* TurboCheetah 0.9.5
* TurboJson 1.0
* PyProtocols 1.0a0
* Cheetah 1.0
* PasteDeploy 1.1
* Paste 1.2.1
* kid 0.9.5
* Cheetah 1.0
* RuleDispatch 0.5a0.dev-r2306
Identity Providers
* sqlobject (TurboGears 1.0.2.2)
* sqlalchemy (TurboGears 1.0.2.2)
tg-admin Commands
* crud (tgcrud 1.0Beta2)
* info (TurboGears 1.0.2.2)
* shell (TurboGears 1.0.2.2)
* quickstart (TurboGears 1.0.2.2)
* update (TurboGears 1.0.2.2)
* sql (TurboGears 1.0.2.2)
* i18n (TurboGears 1.0.2.2)
* toolbox (TurboGears 1.0.2.2)
Visit Managers
* sqlobject (TurboGears 1.0.2.2)
* sqlalchemy (TurboGears 1.0.2.2)
Template Engines
* genshi-markup (Genshi 0.4)
* genshi-text (Genshi 0.4)
* genshi (Genshi 0.4)
* kid (TurboKid 1.0.1)
* cheetah (TurboCheetah 0.9.5)
* json (TurboJson 1.0)
Widget Packages
* scriptaculous (Scriptaculous 1.6.2)
Toolbox Plugins
* info (TurboGears 1.0.2.2)
* catwalk (TurboGears 1.0.2.2)
* shell (TurboGears 1.0.2.2)
* designer (TurboGears 1.0.2.2)
* widgets (TurboGears 1.0.2.2)
* admi18n (TurboGears 1.0.2.2)
TurboGears Extensions
* visit (TurboGears 1.0.2.2)
* identity (TurboGears 1.0.2.2)
Thanks,
Mel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---