title: DateTime object is none -- Python
body: <p>I'm doing this inside Django. The DateTime string is passed into POST successfully. This is my code:</p>
  
  <pre><code>vk = Vk()
  day1 = request.POST['day1']
  vk.day1 = datetime.datetime.strptime(day1, '%m/%d/%Y %I:%M %p')
  vk.save()
  </code></pre>
  
  <p>This is the format of the POST info:</p>
  
  <pre><code>'day1': 'MM/DD/YYYY HH:MM AM/PM' # AM/PM meaning either AM or PM
  </code></pre>
  
  <p>The problem is that the <code>DateTimeField</code> on the vk instance is <code>None</code>.</p>
  
  <pre><code>class Vk(models.Model):
      day1 = models.DateTimeField(null=True, blank=True)
  </code></pre>
  
  <p>I see that it is None in my HTML file:</p>
  
  <pre><code>{% for vk in vk %}
  {{ vk.day1 }}
  {% endfor %}
  </code></pre>
  
  <p>which amounts to None.</p>
  
  <p>This is the view that is responsible for rendering the template:</p>
  
  <pre><code>def list_verkefni(request):
      vk = Vk.objects.all()
      vm = Vm.objects.all()
  
      return render(request, 'list_verkefni.html', 
      {'vk': vk, 'vm': vm}
      )
  </code></pre>