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:
parent
c8d6361c36
commit
993ce9289d
2 changed files with 13 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue