title: redirect old url to new url with django
body: <p>I changed my website url to new one , but google is showing my old url , i have read that i need to make 301 redirect to help google to show my new url, but i don't know how to make it with django! </p>
  
  <p>my old url :</p>
  
  <pre><code>path('&lt;int:pk&gt;/', views.ArticleDetail.as_view(), name='detail')
  </code></pre>
  
  <p>my new url : </p>
  
  <pre><code>path('&lt;int:pk&gt;/&lt;slug&gt;', views.ArticleDetail.as_view(), name='detail')
  </code></pre>
  
  <p>more info :
  i'm using nginx</p>