Changeset 3873
- Timestamp:
- 01/14/2008 12:25:54 PM (7 months ago)
- Files:
-
- branches/paul/dabo/settings.py (modified) (2 diffs)
- branches/paul/dabo/ui/uiwx/dGrid.py (modified) (2 diffs)
- branches/paul/dabo/ui/uiwx/dTextBoxMixin.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/paul/dabo/settings.py
r3632 r3873 1 1 # -*- coding: utf-8 -*- 2 import locale 3 2 4 # Dabo Global Settings 3 5 … … 111 113 checkForWebUpdates = True 112 114 115 dateFormat = locale.nl_langinfo(locale.D_FMT) 116 datetimeFormat = locale.nl_langinfo(locale.D_T_FMT) 117 113 118 ### Settings - end 114 119 branches/paul/dabo/ui/uiwx/dGrid.py
r3867 r3873 334 334 if bizobj: 335 335 if field and (row < bizobj.RowCount): 336 ret = bizobj.getFieldVal(field, row)336 ret = self.getStringValue(bizobj.getFieldVal(field, row)) 337 337 else: 338 338 ret = "" … … 346 346 return ret 347 347 348 def getStringValue(self, val): 349 """Get the string value to display in the grid.""" 350 if isinstance(val, datetime.date): 351 return val.strftime(dabo.settings.dateFormat) 352 return val 348 353 349 354 def SetValue(self, row, col, value): branches/paul/dabo/ui/uiwx/dTextBoxMixin.py
r3855 r3873 16 16 numericTypes = (int, long, float) 17 17 valueErrors = (ValueError, ) 18 18 19 # Make this locale-independent 19 20 decimalPoint = locale.localeconv()["decimal_point"] … … 514 515 # Use the ISO 8601 date string format so we can convert 515 516 # back from a known quantity later... 516 strVal = value.isoformat() 517 #strVal = value.isoformat() 518 strVal = value.strftime(dabo.settings.dateFormat) 517 519 elif isinstance(value, datetime.time): 518 520 # Use the ISO 8601 time string format
