Add before_render_index() customization hook for MasterView

This commit is contained in:
Lance Edgar 2021-08-24 09:39:45 -05:00
parent 3cf4c0f8e4
commit c3079fe899

View file

@ -335,8 +335,17 @@ class MasterView(View):
context['download_results_rows_fields_available'] = available
context['download_results_rows_fields_default'] = self.download_results_rows_fields_default(available)
self.before_render_index()
return self.render_to_response('index', context)
def before_render_index(self):
"""
Perform any needed logic just prior to rendering the index
response. Note that this logic is invoked only when rendering
the main index page, but *not* invoked when refreshing partial
grid contents etc.
"""
def make_grid(self, factory=None, key=None, data=None, columns=None, **kwargs):
"""
Creates a new grid instance