You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi all
I created a form with a textarea that has a max_length of 1024, this
textarea is rendered in frontend with a Javascript character counter,
what is odd is that the counter was giving the right length, in this
case 1024 and the form was failing in the max_length... debugging I
came to see that the Form is receiving the \n as \r\n in the POST data
for it.
So the length if failing cause '\r\n' counts as 2 intead of 1.
Searching on the internet I found out that it seems that the textarea
sends \r\n instead of \n. Is there any way to deal with this in
Django?
For now I will remove the max_length and make my own clean method for
this case.
Regards
Esteban
eka (Esteban)
unread,
Jun 25, 2010, 11:09:34 PM6/25/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
By now I made my own TextAreaField that will replace('\r\n', '\n') in
the to_python method