FinTech_app/pdf_view/views.py

10 lines
345 B
Python
Raw Normal View History

2023-01-24 14:48:22 +01:00
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