title: How do I pass multiple class attributes through django to the template?
body: <p>Getting this error:
  Exception Value:<br>
  Could not parse the remainder: ' + contact.last_name' from 'contact.first_name + contact.last_name'</p>
  
  <p>I am having trouble displaying a list of names, with each name as a link.</p>
  
  <p>My models.py code:</p>
  
  <pre><code>class Contact(models.Model):
      first_name = models.CharField("First Name", max_length=30)
      last_name = models.CharField("Last Name", max_length=30)
  
      def __unicode__(self):
          return u'%s %s' % (self.first_name, self.last_name)
  </code></pre>
  
  <p>My views.py code:</p>
  
  <pre><code>from django.http import HttpResponse
  from pk.models import Contact
  from django.template import Context, loader
  from django.shortcuts import render_to_response
  
  def index(request):
      contact_list = Contact.objects.all()
      return render_to_response('pk/index.html', {'contact_list': contact_list})
  </code></pre>
  
  <p>My index.html template:</p>
  
  <pre><code>{% if contact_list %}
  &lt;ul&gt;
  {% for contact in contact_list %}
      &lt;li&gt;&lt;a href="/pkl/{{ contact.id }}/"&gt;{{ contact.first_name + contact.last_name }}&lt;/a&gt;&lt;/li&gt;
  {% endfor %}
  &lt;/ul&gt;
  {% else %}
  &lt;p&gt;No contacts are available.&lt;/p&gt;
  {% endif %}
  </code></pre>