title: Returning more than one field from Django model
body: <p>How would one go about returning more than one field from a Django model declaration?</p>
  
  <p>For instance: I have defined:</p>
  
  <pre><code>class C_I(models.Model):
      c_id = models.CharField('c_id', max_length=12)
      name = models.CharField('name', max_length=100)
      def __str__(self):
          return '%s' % (self.name)
  </code></pre>
  
  <p>which I can use, when called in a views.py function to return </p>
  
  <pre><code>    {{ c_index }}
  
          {% for c in c_index %}
  
              &lt;div class='c-index-item' c-id=''&gt;
  
                  &lt;p&gt;{{ c.name }}&lt;/p&gt;
  
              &lt;/div&gt;
  
          {% endfor %}
  </code></pre>
  
  <p>from a template. This is being called in my views.py like so:</p>
  
  <pre><code>c_index = C_I.objects.all()
  
  t = get_template('index.html')
  
  c  = Context({'c_index': c_index})
  
  html = t.render(c)
  </code></pre>
  
  <p>How would I also include the c_id defined in the model above, so that I can include {{c.name}} and {{c.c_id}} in my template? When I remove the <strong>str</strong> method, I appear to get all of the results, however, it just returns blank entries in the template and will not let me reference the individual components of the object. </p>