Tell me how in Django to allow an authorized user to download certain files (intended for him)? To this link failed to download the file in another browser or computer. And another authorized user could only download their files, and not strangers.
Found two solutions: django-downloadview and django-sendfile . You can also use HttpResponse .
As I understand it is possible to use with small files. Example:
def download(request): my_data = 'some xls file' response = HttpResponse(my_data, content_type='application/vnd.ms-excel') response['Content-Disposition'] = 'attachment; filename=file.xls' return response