Коммит 0ac01cea создал по автору Дмитриев Алекссей Романович's avatar Дмитриев Алекссей Романович
Просмотр файлов

небольшие правки

владелец 62b98e68
......@@ -158,7 +158,6 @@ def profile(request):
close_projects_packs = [ProjectsPack(project) for project in close_projects_st]
request_projects_packs = [ProjectsPack(project) for project in request_projects_st]
else:
open_projects_T = Project.objects.filter(teacher=request.user, _status = "on work")
close_projects_T = Project.objects.filter(teacher=request.user, _status = "done")
request_projects_T = Project.objects.filter(teacher=request.user, _status = "send request")
......
......@@ -219,7 +219,7 @@ def download_file(request: HttpRequest):
if check_what_user_not_have_access(request, file_object.project):
return render(request, "NotEnoughPermissions.html")
filepath = file_object.file.path
return FileResponse(open(filepath, 'rb'))
return FileResponse(open(filepath, 'rb'), as_attachment=True)
except File.DoesNotExist:
return render(request, "WrongData.html")
except BaseException as e:
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать