title: How to access url path in django view
body: <p>How can I access the url in a Django view. I have a view handling following 5 urls:</p>
  
  <pre><code>localhost:8000/standings/
  localhost:8000/standings/q1
  localhost:8000/standings/q2
  localhost:8000/standings/q3
  localhost:8000/standings/q4
  </code></pre>
  
  <p>and my view is </p>
  
  <pre><code>class StandingsView(LoginRequiredMixin, TemplateView):
      template_name = 'standings.html'
  </code></pre>
  
  <p>Based on <code>q1</code>, <code>q2</code>, <code>q3</code>, <code>q4</code> or <code>None</code> in the url path, I have to query data from the db and render to the given template.</p>
  
  <p>Please suggest on how such scenarios can be handled.</p>