title: Django TypeError objects is not iterable
body: <p>I tried to show a model data in html template in django.</p>
  
  <p><strong>My Model:</strong></p>
  
  <pre><code>class Author(models.Model):
      first_name = models.CharField(max_length=100)
      last_name = models.CharField(max_length=100)
      date_of_birth = models.DateField(blank=True, null=True)
      date_of_death = models.DateField(blank=True, null=True)
  
      def get_absolute_url(self):
          return reverse('author_detail', args=[str(self.id)])
  
      class Meta():
          ordering = ['first_name', 'last_name']
  
      def __str__(self):
          return f'{self.first_name} {self.last_name}'
  </code></pre>
  
  <p><strong>My View:</strong></p>
  
  <pre><code>def author_detail_view(request, pk):
      author = get_object_or_404(Author, pk=pk)
      return render(request, 'author_detail.html', context={'author_detail': author})
  </code></pre>
  
  <p><strong>My URL:</strong></p>
  
  <pre><code> path('author/&lt;int:pk&gt;', views.author_detail_view, name='author_detail')
  
  And My Templates View:
  {% extends 'base.html' %}
  
  {% block content %}
  &lt;h1&gt;Author Detail&lt;/h1&gt;
      {% for author in author_detail %}
  &lt;ul&gt;
      &lt;li&gt;Name: {{ author.first_name }} {{ author.last_name }}&lt;/li&gt;
      &lt;li&gt;Date of Birth: {{ author.date_of_birth }}&lt;/li&gt;
  &lt;/ul&gt;
      {% endfor %}
  {% endblock %}
  </code></pre>
  
  <p>But the probelem is, it shoing error that : </p>
  
  <p><strong>TypeError at /author/2</strong></p>
  
  <p><strong>'Author' object is not iterable</strong></p>
  
  <p>Request Method:     GET
  Request URL:    <a href="http://127.0.0.1:8000/author/2" rel="nofollow noreferrer">http://127.0.0.1:8000/author/2</a>
  Django Version:     2.1.5
  Exception Type:     TypeError
  Exception Value:    </p>
  
  <p>'Author' object is not iterable</p>
  
  <p>Exception Location:     /home/pyking/.local/lib/python3.6/site-packages/django/template/defaulttags.py in render, line 165
  Python Executable:  /usr/bin/python3
  Python Version:     3.6.7</p>