From 330088704d6ed1130a6b05f991c57eee99aa1cc0 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 3 Aug 2023 08:37:48 +0000 Subject: [PATCH] UploadFileForm: filter uploadable files to Excel spreadsheets --- xlsform_app/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlsform_app/views.py b/xlsform_app/views.py index 731bf15..4ead3ce 100644 --- a/xlsform_app/views.py +++ b/xlsform_app/views.py @@ -18,7 +18,7 @@ DJANGO_TMP_HOME = os.environ['DJANGO_TMP_HOME'] class UploadFileForm(forms.Form): - file = forms.FileField() + file = forms.FileField(attrs={ 'accept': '.xls, .xlsx' }) def clean_name(name):