Fixed batch grid and CRUD views so that the execution time shows a pretty (and
local) display instead of 24-hour UTC time.
This commit is contained in:
parent
470aa10d9f
commit
b4feccbca0
|
@ -35,7 +35,7 @@ from webhelpers.html import tags
|
|||
|
||||
import edbob
|
||||
from edbob.pyramid import Session
|
||||
from edbob.pyramid.forms import EnumFieldRenderer
|
||||
from edbob.pyramid.forms import EnumFieldRenderer, PrettyDateTimeFieldRenderer
|
||||
from edbob.pyramid.grids.search import BooleanSearchFilter
|
||||
from edbob.pyramid.progress import SessionProgress
|
||||
from edbob.pyramid.views import SearchableAlchemyGridView, CrudView, View
|
||||
|
@ -85,6 +85,7 @@ class BatchesGrid(SearchableAlchemyGridView):
|
|||
|
||||
def grid(self):
|
||||
g = self.make_grid()
|
||||
g.executed.set(renderer=PrettyDateTimeFieldRenderer(from_='utc'))
|
||||
g.configure(
|
||||
include=[
|
||||
g.source,
|
||||
|
@ -119,6 +120,7 @@ class BatchCrud(CrudView):
|
|||
def fieldset(self, model):
|
||||
fs = self.make_fieldset(model)
|
||||
fs.action_type.set(renderer=EnumFieldRenderer(rattail.BATCH_ACTION))
|
||||
fs.executed.set(renderer=PrettyDateTimeFieldRenderer(from_='utc'))
|
||||
fs.configure(
|
||||
include=[
|
||||
fs.source,
|
||||
|
|
Loading…
Reference in a new issue