Reason: Having consistent data representation in the database is nice, and 
maybe also useful in some use-cases, e.g. using the data to train a deep 
learning model. This tweak seems it could only help, and shouldn't break 
anything. If, for some reason a developer needs to use \r\n for display, he 
cannot rely on the client to always send \r\n in the form data, because OSX 
or unix sends just \n, so it seems to me that if I would need \r\n for 
display, It would also be nice to have just \n in the database, and replace 
it using a template filter during html construction.

On Monday, November 12, 2018 at 3:58:39 PM UTC+1, Jakub Kleň wrote:
>
> I'm thinking if it wouldn't be nice if django automatically normalized 
> newlines of data entered by the user. The implementation would be really 
> simple, there's already a function for it in 
> django.utils.text.normalize_newlines, and it would go into 
> django.forms.fields.CharField.to_python the same as split() (maybe also 
> with an ivar for controlling the behavior, although I'm not sure if it's 
> needed). What do you think?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/74ef4827-1088-4f22-986c-efd38b94bb78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to