[gen] Table of indexes: indexed date values are now correctly displayed as DateTime instances.

This commit is contained in:
Gaetan Delannay 2015-01-22 18:43:10 +01:00
parent 195adf8d11
commit 6f488644e3
2 changed files with 24 additions and 2 deletions

View file

@ -113,8 +113,8 @@ class ToolMixin(BaseMixin):
res = index.getEntryForObject(catalogBrain.getRID())
if indexType == 'DateIndex':
# The index value is a number. Add a DateTime representation too.
from DateTime import DateTime
res = '%d (%s)' % (res, DateTime(res))
from appy.fields.date import getDateFromIndexValue
res = '%d (%s)' % (res, getDateFromIndexValue(res))
return res
def getApp(self):