Add new Buefy-specific upgrade template
since that was broken..
This commit is contained in:
parent
9faaea881d
commit
f0880785a9
5 changed files with 129 additions and 26 deletions
|
@ -24,6 +24,7 @@
|
|||
Model Master View
|
||||
"""
|
||||
|
||||
import io
|
||||
import os
|
||||
import csv
|
||||
import datetime
|
||||
|
@ -33,7 +34,6 @@ import tempfile
|
|||
import logging
|
||||
|
||||
import json
|
||||
import six
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
import sqlalchemy_continuum as continuum
|
||||
|
@ -115,6 +115,7 @@ class MasterView(View):
|
|||
executable = False
|
||||
execute_progress_template = None
|
||||
execute_progress_initial_msg = None
|
||||
execute_can_cancel = True
|
||||
supports_prev_next = False
|
||||
supports_import_batch_from_file = False
|
||||
has_input_file_templates = False
|
||||
|
@ -1839,6 +1840,7 @@ class MasterView(View):
|
|||
return self.render_progress(progress, {
|
||||
'instance': obj,
|
||||
'initial_msg': self.execute_progress_initial_msg,
|
||||
'can_cancel': self.execute_can_cancel,
|
||||
'cancel_url': self.get_action_url('view', obj),
|
||||
'cancel_msg': "{} execution was canceled".format(model_title),
|
||||
}, template=self.execute_progress_template)
|
||||
|
@ -3785,7 +3787,7 @@ class MasterView(View):
|
|||
"""
|
||||
obj = self.get_instance()
|
||||
fields = self.get_row_csv_fields()
|
||||
data = six.StringIO()
|
||||
data = io.StringIO()
|
||||
writer = UnicodeDictWriter(data, fields)
|
||||
writer.writeheader()
|
||||
for row in self.get_effective_row_data(sort=True):
|
||||
|
|
|
@ -60,6 +60,7 @@ class UpgradeView(MasterView):
|
|||
executable = True
|
||||
execute_progress_template = '/upgrade.mako'
|
||||
execute_progress_initial_msg = "Upgrading"
|
||||
execute_can_cancel = False
|
||||
|
||||
labels = {
|
||||
'executed_by': "Executed by",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue