How to disable auto strip in Charfield in Django
·2 mins
In Django, when edit field in admin page or post data to forms, the leading and tailing whitespace in CharField and TextField are removed.
The reason is strip=True parameter in forms.CharField, which is added in Djagno 1.9. You can see the discussion in django tiket #4960 and here is source code.