diff --git a/myproject/myapp/urls.py b/myproject/myapp/urls.py index e54d54341e211d96564d9cb12cc21b39e7bd6aeb..3ade001947fcbe29d194d8475e296ad700489e14 100644 --- a/myproject/myapp/urls.py +++ b/myproject/myapp/urls.py @@ -28,6 +28,5 @@ urlpatterns = [ path('pricay_policy/', privacy_policy, name='privacy_policy'), path('pricing/', pricing, name='pricing'), path('uploading_file/', handling_music_file, name='uploading_file'), -, path('generate_pdf/', generate_pdf, name='generate_pdf') ] diff --git a/myproject/myapp/views.py b/myproject/myapp/views.py index cb4ea119062608adb5455706b7a4b7465becc884..e0a188b750155080af2e34e6f0795d09ab601ecf 100644 --- a/myproject/myapp/views.py +++ b/myproject/myapp/views.py @@ -90,15 +90,3 @@ def generate_pdf(request): return response - -#For testing the receipts ONLY. TODO: delete when working -def generate_pdf(request): - response = HttpResponse(content_type='application/pdf') - response['Content-Disposition'] = 'attachment; filename="example.pdf"' - - p = canvas.Canvas(response) - p.drawString(100, 800, "Hello, this is a PDF!") - p.showPage() - p.save() - - return response \ No newline at end of file diff --git a/myproject/requirements.txt b/myproject/requirements.txt index edf7e90566d18aac9154bb5b9e4b05666b3e9de3..72f9567a4738fc3db60a6bd1af8518f23d957002 100644 --- a/myproject/requirements.txt +++ b/myproject/requirements.txt @@ -32,4 +32,5 @@ soundfile==0.12.1 soxr==0.3.7 threadpoolctl==3.3.0 typing_extensions==4.10.0 -urllib3==2.2.1 \ No newline at end of file +urllib3==2.2.1 +reportlab==4.1.0 \ No newline at end of file