title: django rest framework multiple url arguments
body: <p>In rest api view I need to have 2 objects. For example:</p>
  
  <pre><code>class Foo(models.Model):
      ....
  
  class Bar(models.Model):
      ....
  </code></pre>
  
  <p>What is correct way to get them? I mean how should I configure urls? I think this is not really good practice: <code>url(r'^foo/(?P&lt;pk&gt;\d+)/bar/(?P&lt;pk&gt;\d+)/$', FooBarView.as_view())</code>
  Or: <code>url(r'^foobar/$', FooBarView.as_view())</code> and then pass parameters: <code>?foo=1&amp;bar=2</code>.</p>