title: Protecting online static content
body: <p>How would I only allow users authenticated via Python code to access certain files on the server?</p>
  
  <p>For instance, say I have <code>/static/book.txt</code> which I want to protect. When a user accesses <code>/some/path/that/validates/him</code>, a Python script deems him worthy of accessing <code>/static/book.txt</code> and redirects him to that path.</p>
  
  <p>How would I stop users who bypass the script and directly access <code>/static/book.txt</code>?</p>