title: Django Feed.item_link: URL depends on both the item and the get_object parameters
body: <p>I have an application with entries and containers. There is a ManyToMany relationship between them:</p>
  
  <ul>
  <li>A container contains 0 or more entries</li>
  <li>An entry is in 0 or more containers</li>
  </ul>
  
  <p>I use the following schema for URIs:</p>
  
  <ul>
  <li>prefix/container</li>
  <li>prefix/container/entry</li>
  </ul>
  
  <p>This means that several URLs can lead to the same entry. Each URL defines a different context.</p>
  
  <p>I'm trying to create a RSS/Atom Feed for each container. My issue is how to implement the <code>Feed.item_link</code> method to returns
  the right URL. I need to invoke <code>urlresolvers.reverse</code> with two arguments: the container identifier and the entry identifier. 
  Unfortunately item_link receives only the entry as parameter. Only <code>Feed.get_object</code> method knows about the container. What is the cleanest solution to solve this issue ? </p>
  
  <p>Sample code follows:</p>
  
  <h3>Models</h3>
  
  <pre><code>    class Entry(models.Model):
          pass
  
      class Container(models.Model):
          entries = models.ManyToManyField("Entries",
                  related_name='containers',
                  null=True,
                  blank=True
          )
  </code></pre>
  
  <h3>URLs</h3>
  
  <pre><code>    url(r'^prefix/(?P&lt;container_slug&gt;[-\w]+)/rss$', feeds.LatestEntries()),
  </code></pre>
  
  <h3>Feed</h3>
  
  <pre><code>    class LatestEntries(Feed):
          title = "foo"
          description = "bar"
  
          def get_object(self, request, container_slug):
              return get_object_or_404(models.Container, slug=container_slug)
  
          def item_link(self, entry):
              # TODO: How to pass container_slug to reverse() ?
              return urlresolvers.reverse('up.views.portfolio_image', kwargs={
                      'container_slug': 'FIXME',
                      'entry_slug': entry.slug,
                  })
  </code></pre>