Only show Restart Filemon button if so configured
otherwise everyone would need to include that view in their config
This commit is contained in:
parent
2131ea65cb
commit
1123cbb728
2 changed files with 5 additions and 1 deletions
|
@ -63,6 +63,10 @@ class DataSyncChangesView(MasterView):
|
|||
g.set_sort_defaults('obtained')
|
||||
g.set_type('obtained', 'datetime')
|
||||
|
||||
def template_kwargs_index(self, **kwargs):
|
||||
kwargs['allow_filemon_restart'] = bool(self.rattail_config.get('tailbone', 'filemon.restart'))
|
||||
return kwargs
|
||||
|
||||
def restart(self):
|
||||
# TODO: Add better validation (e.g. CSRF) here?
|
||||
if self.request.method == 'POST':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue