title: all pictures display from category django
body: <p>I want to display all my pictures which are in assigned category In for loop it doesn`t show anything, but if i don`t use for loop it displays only one image.</p>
  
  <p>views.py</p>
  
  <pre><code>def lists(request, category_id):
      image = get_object_or_404(Image, pk=category_id)
      context = {'image': image}
      return render(request, 'photo/lists.html', context)
  </code></pre>
  
  <p>lists.html</p>
  
  <pre><code>    {% for image in images %}
          &lt;a href="#"&gt;&lt;img src="{{ image.image.url }}" style="width:200px; height: 200px; float:left;"/&gt;&lt;/a&gt;
      {% endfor %}    
  </code></pre>
  
  <p>models.py</p>
  
  <pre><code>class Image(models.Model):
      title        = models.CharField(max_length=255)
      slug         = models.SlugField(unique=True, max_length=255)
      category     = models.ForeignKey('Category')
      description  = models.CharField(max_length=255)
      published    = models.BooleanField(default=False)
      created      = models.DateTimeField(auto_now_add=True)
      image        = models.ImageField(upload_to="images")
  
      def __unicode__(self):
          return u'%s' % self.title
  
  
  class Category(models.Model):
      title        = models.CharField(max_length=255)
      slug         = models.SlugField(unique=True, max_length=255)
  
      def __unicode__(self):
          return u'%s' % self.title
  </code></pre>