title: Django variable inside static tag?
body: <p>This is part of index.html:</p>
  <pre><code>    {% for listing in active_listings %}
          &lt;tr&gt;
              &lt;td&gt;{{ listing.title }}&lt;/td&gt;
              &lt;td&gt;{{ listing.description }}&lt;/td&gt;
              &lt;td&gt;{{ listing.bid }}$&lt;/td&gt;
              {% if listing.image %}
              &lt;td&gt;{{ listing.image }}&lt;/td&gt;
              &lt;td&gt;&lt;img src=&quot;{% static 'auctions/'|add:listing.image %}&quot; alt=&quot;photo&quot;&gt;&lt;/td&gt; 
              &lt;!-- Here !!! --&gt;
              {% else %} 
              &lt;td&gt;No photo.&lt;/td&gt;
              {% endif %}
          &lt;/tr&gt;
       {% endfor %}
  </code></pre>
  <p>This is the corresponding views.py:</p>
  <pre><code>def index(request):
  
      return render(request, &quot;auctions/index.html&quot;, {
          &quot;active_listings&quot;: Listing.objects.filter(active=True),
      })
  </code></pre>
  <p>And that is my Listing Model in models.py:</p>
  <pre><code>class Listing(models.Model):
      CATEGORIES = [
          ('BO', 'Books'),
          ('TO', 'Toys'),
          ('EL', 'Electronics'),
          ('FA', 'Fashion'),
          ('HO', 'Home'),
      ]
      title = models.CharField(max_length=64)
      description = models.TextField(max_length=256)
      bid = models.PositiveIntegerField()
      image = models.ImageField(null=True, blank=True)
      category = models.CharField(max_length=2, choices=CATEGORIES, null=True, blank=True)
      active = models.BooleanField(default=True)
  </code></pre>
  <p>Why can't I <strong>add</strong> the variable <strong>listing.image</strong> in the static tag???</p>
  <p>It gives me: <code>&quot;GET /static/ HTTP/1.1&quot; 404 1634</code>.</p>
  <p>What I want to have is <code>/static/auctions/foo.jpeg</code>, if <code>listing.image = 'foo.jpeg'</code>. How can I do this?</p>