If this is your root objective, then take advantage of the facilities that nginx provides for you.
Briefly, nginx provides directives that will cause it to send the requested url to a view for validation, while still allowing nginx to serve the file itself.
See Show external folder html content in django - #2 by KenWhitesell and Securing Uploaded Files - #2 by KenWhitesell that each contain some links with options.