tomchristie/django-rest-framework — pull request #1669 by pySilver (2014-06-28 22:01:56+00:00)
Title: Fixes CharField behaviour and introduces proper validation for ModelField

This PR fixes problems described at #1570, #1665 and #1663

In short:
- CharField should return "" (empty string) for empty values like django.form CharField does. Since django model prevents charfield to be nullable https://docs.djangoproject.com/en/dev/ref/models/fields/#null we can assume this is correct behaviour for DRF.
- ModelField throws error if value is None and bounded model field is not nullable. (django docs says it is our responsability to make this check, thats why it is here, otherwise it'd result int IntegrityError which is not usefull for any api client.) See: https://code.djangoproject.com/ticket/22921

All tests are green.