Django: Downloading files only for logged in users

Job ID: 30653399

Budget: €8 – €30 EUR

Hello,

this time I need help with Django.

I need to deploy pdf download for logged in users only. If someone knows the URL to the file, they will need to login to download it.

I do not share the entire application, only:

- models (only the one this applies to)
- views
- urls

Access to the server is not possible. After receiving the proposed changes, I will implement them, try them out, and if they work: pay you.

- It is possible that I have already done everything for you, but I have one small mistake somewhere: the better for you.

- Currently set paths for sending files and their sending model must remain unchanged.

INFORMATION:

- used Django version: 3.2
- used Python: 3.7
- Isolated environment
- Nginx configuration: (you will get unedited view)
- DB: MySql

Model: 35 lines of code
HashLink: 4 lines of code
Upload file (only in model for Admin Panel): 6 lines of code
Views (standard): 32 lines of code
Views (My implementation 'X-Accel-Redirect'): 12 lines of code
Urls (what should interest you): 1 line of code

I encourage you to participate in the bidding process. I always withdraw money within 2 minutes if you have met my expectations. Always adds a tip. He always gives a comment appropriate to the work done.
Related categories: JavaScript Python Django Software Architecture MySQL