Refactor and implement download code natively

- Use modified port of Django 2.2 FileResponse.
- Remove Django DownloadView library.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-12-12 19:38:12 -04:00
parent 826f7fddf2
commit a7b31fc171
24 changed files with 355 additions and 278 deletions

View File

@@ -45,7 +45,9 @@ class DocumentDownloadForm(forms.Form):
super(DocumentDownloadForm, self).__init__(*args, **kwargs)
if self.queryset.count() > 1:
self.fields['compressed'].initial = True
self.fields['compressed'].widget.attrs.update({'disabled': True})
self.fields['compressed'].widget.attrs.update(
{'disabled': 'disabled'}
)
class DocumentForm(forms.ModelForm):