#2376: Impossible to pass empty strings/dicts/lists/zero-based values as default
value of widgets
------------------------+---------------------------------------------------
 Reporter:  xaka        |       Owner:          
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:  1.x     
Component:  TurboGears  |     Version:  1.1 HEAD
 Severity:  normal      |    Keywords:          
------------------------+---------------------------------------------------
 For example i want to pass 0 as default value (int, not a string):
 {{{
 field = turbogears.widgets.TextField(name='test', default=0)
 print field.default # will output None
 }}}

 Reason of that is invalid expression in Widget constructor:
 {{{
 if default:
     self.default = default
 }}}
 Which should be changed to:
 {{{
 if default is not None:
     self.default = default
 }}}

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2376>
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.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to