from django.shortcuts import render from django.http import HttpResponse # def pdf_view(request): # with open('Czym jest portfel inwestycyjny.pdf', 'rb') as pdf: # response = HttpResponse(pdf.read(), content_type='application/pdf') # response['Content-Disposition'] = 'inline;filename=mypdf.pdf' # return response