How to set empty value to DateField in django model?
<p>What am I doing wrong here? I need to set empty value to doing_field. </p>

<pre><code>def delete_todo_today(request):
    if request.is_ajax() and request.POST and request.user.is_authenticated:
        thingtodo = ThingToDo.objects.filter(author = request.user, thing = request.POST.get('item'))
        thingtodo.doing_date = None
        thingtodo.save()
        data = {'message': "%s 's doing_date deleted" % request.POST.get('item')}
        return HttpResponse(json.dumps(data), content_type='application/json')
    else:
        raise Http404
</code></pre>

<p>by default <code>models.DateField.empty_strings_allowed</code> is set to <code>False</code>,
<a href="https://docs.djangoproject.com/en/1.10/_modules/django/db/models/fields/#DateField" rel="nofollow">https://docs.djangoproject.com/en/1.10/_modules/django/db/models/fields/#DateField</a></p>

<p>try defining <code>ThingToDo.doing_date</code> with <code>options['blank'] = True</code> something like <code>doing_date = models.DateField(**options)</code></p>

python django