Add basic "downloadable" support for ExportMasterView

instead of it trying to do its own thing for that...  more to come on this
This commit is contained in:
Lance Edgar 2019-07-05 16:48:29 -05:00
parent c8d6361c36
commit 993ce9289d
2 changed files with 13 additions and 0 deletions

View file

@ -2767,6 +2767,13 @@ class MasterView(View):
"""
return getattr(cls, 'mobile_row_form_factory', forms.Form)
def download_path(self, obj, filename):
"""
Should return absolute path on disk, for the given object and filename.
Result will be used to return a file response to client.
"""
raise NotImplementedError
def render_downloadable_file(self, obj, field):
filename = getattr(obj, field)
if not filename: