from django.db import models
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
+from django.utils.text import normalize_newlines, wrap
from django.utils.translation import ugettext_lazy as _
from threadedcomments.models import ThreadedComment
If private is True, private comments are included in this list.
"""
def quote_reply(comment):
- return "\n".join(["> " + l for l in comment.comment.split("\n")])
+ text = wrap(normalize_newlines(comment.comment), 72)
+ return "\n".join(["> " + l for l in text.split("\n")])
# Import here to prevent dependency loop, since forms depends on
# models as well