Changeset 8151 for main/waeup.kofa/trunk
- Timestamp:
- 14 Apr 2012, 14:03:40 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/schema
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/schema/field.py
r8146 r8151 139 139 `date_format` 140 140 additional attribute to describe desired date format. Must be a 141 string that can be fed to strftime/strptime functions. 141 string that can be fed to strftime/strptime functions. By 142 default `None`. 142 143 143 144 `show_year` 144 145 boolean indicating whether some kind of year selection should 145 be used with this instance. 146 be used with this instance. `False` by default. 146 147 """ 147 148 implements(IFormattedDate) 148 date_format = '%Y-%m-%d'149 date_format = None 149 150 show_year = False 150 def __init__(self, date_format= '%Y-%m-%d', show_year=False, *args, **kw):151 def __init__(self, date_format=None, show_year=False, *args, **kw): 151 152 self.date_format = date_format 152 153 self.show_year = show_year -
main/waeup.kofa/trunk/src/waeup/kofa/schema/tests/test_fields.py
r8146 r8151 23 23 obj = FormattedDate() 24 24 self.assertEqual(obj.show_year, False) 25 self.assertEqual(obj.date_format, '%Y-%m-%d')25 self.assertEqual(obj.date_format, None) 26 26 return 27 27
Note: See TracChangeset for help on using the changeset viewer.