Type error "must be string, not datetime.datetime"
<p>I've got some error in my view and I don't have any idea, what is wrong:</p>

<pre><code>from datetime import datetime

for month_dict in finished_by_month:
    month_values.append(month_dict['total'])
    month_date = datetime.strptime(month_dict['month'], '%Y-%m-%d')
</code></pre>

<p>When I try to see my template I've got an error:</p>

<blockquote>
  <p>"must be string, not datetime.datetime"</p>
</blockquote>

<p>I was looking for solution, but I can't find anything. Maybe someone has got similar problem?</p>