title: Django : local variable 'date' referenced before assignment but I import it
body: <p>I am building a script that use the datetime module :</p>
  
  <pre><code>def workspace_detail(request, token):
  yesterday = date.today() -  timedelta(days=1)
  tomorrow = date.today() - timedelta(days=1)
  quicklink = f"{token}start_date={yesterday}&amp;end_date={tomorrow}"
  w_yesterday = quicklink
  </code></pre>
  
  <p>But I have this error </p>
  
  <blockquote>
    <p>local variable 'date' referenced before assignment</p>
  </blockquote>
  
  <p>I imported it every module from the datetime package </p>
  
  <pre><code>from datetime import datetime, date, timedelta
  </code></pre>
  
  <p>If I use datetime.today() it works, but I want to use the date.today() for my url.</p>
  
  <p>Thanks</p>