title: Django Middleware: How do I access a view's params from middleware
body: <p>Let's say I have a view:</p>
  
  <pre><code>def pony_view(request, arg1, arg2):
      ... Make ponies, etc ...
  </code></pre>
  
  <p>And a middleware:</p>
  
  <pre><code>class MyMiddleware(object):
      def process_request(request):
          # How do I access arg1, arg2 here?
  </code></pre>
  
  <p>Of course arg1, and arg2 will be passed in via URL params with urls.py.</p>
  
  <p>The reason I need to do this is because I want to add something to request.session before the view function runs (something that I need from the URL though).</p>