1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[1.5.x] Fixed #8627 -- Prevented textareas to swallow first newline content

Browsers consider the first newline in textareas as some display
artifact, not real content. Hence they are not sending it back to
the server. If we want to keep initial newlines, we have to add one
when we render the textarea.
Thanks bastih for the report and initial patch.

Backport of 78f66691ee from master.
This commit is contained in:
Claude Paroz
2012-11-05 20:27:06 +01:00
parent c7d5e7c75b
commit a23c9c48a8
7 changed files with 52 additions and 3 deletions

View File

@@ -83,4 +83,8 @@ class Group(models.Model):
class Cheese(models.Model):
name = models.CharField(max_length=100)
name = models.CharField(max_length=100)
class Article(models.Model):
content = models.TextField()