Add common configuration logic for "input file templates"
just used in one batch so far but should be useful for many more..once can get around to migrating them had to rework the configuration logic to use HTML form instead of JSON, to allow for the file uploads
This commit is contained in:
parent
099b6915f4
commit
30f95e2f08
13 changed files with 405 additions and 95 deletions
|
@ -83,6 +83,8 @@ class BatchMasterView(MasterView):
|
|||
has_worksheet = False
|
||||
has_worksheet_file = False
|
||||
|
||||
input_file_template_config_section = 'rattail.batch'
|
||||
|
||||
grid_columns = [
|
||||
'id',
|
||||
'description',
|
||||
|
@ -157,6 +159,10 @@ class BatchMasterView(MasterView):
|
|||
factory = self.get_handler_factory(self.rattail_config)
|
||||
return factory(self.rattail_config)
|
||||
|
||||
@property
|
||||
def input_file_template_config_prefix(self):
|
||||
return '{}.input_file_template'.format(self.batch_handler.batch_key)
|
||||
|
||||
def download_path(self, batch, filename):
|
||||
return self.rattail_config.batch_filepath(batch.batch_key, batch.uuid, filename)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue