title: Django programming - how to redirect to original url
body: <p>I have a website <strong>www.example.com</strong> with many pages.</p>
  
  <p>On each page I put one special unique button, which link to unique URL <strong>www.example.com/task1</strong>.</p>
  
  <p>Once click this button, Django urls patten will pass it to dedicated function <strong>task1</strong> for me.</p>
  
  <p>My question is how to refresh original URL after completion of the task1, I find <strong>request.path</strong> only could transfer <strong>/task1</strong>. Any idea to get back the URL which the button allocated. Please refer to my task1 function. </p>
  
  <pre><code>def task1(request):
      '''
      do  task1  job
      '''
      return render(request, request.path)  
      # above return could not render the original URL which I clicked from.
  </code></pre>