Add refresh_after_create flag for BatchMasterView

Hopefully this is a good idea too..
This commit is contained in:
Lance Edgar 2016-10-16 03:33:10 -05:00
parent 4757a56002
commit 26c6c083c4

View file

@ -67,6 +67,7 @@ class BatchMasterView(MasterView):
rows_deletable = True
rows_downloadable = True
refreshable = True
refresh_after_create = False
def __init__(self, request):
super(BatchMasterView, self).__init__(request)
@ -273,6 +274,11 @@ class BatchMasterView(MasterView):
"""
return True
def redirect_after_create(self, batch):
if self.refresh_after_create:
return self.redirect(self.get_action_url('refresh', batch))
return super(BatchMasterView, self).redirect_after_create(batch)
# TODO: some of this at least can go to master now right?
def edit(self):
"""