title: How do I auto redirect from my root path?
body: <p>I'm using Django and Python 3.7. I'm having an issue trying to redirect from my homepage ("/") to another path. I want the default root path to redirect to "/trending".  I tried this:</p>
  
  <pre><code>urlpatterns = [
      path(r'/$', redirect_to, {'url': '/trending'}), 
      path('trending', views.trending, name='trending'),
  ]
  </code></pre>
  
  <p>However, I am getting the error:</p>
  
  <pre><code>name 'redirect_to' is not defined
  </code></pre>