from django.utils.translation import ugettext_lazy as _
from threadedcomments.models import ThreadedComment
from django.utils.translation import ugettext_lazy as _
from threadedcomments.models import ThreadedComment
contact = models.CharField(max_length=255, verbose_name = _("Contact Name"))
summary = models.CharField(max_length=255, verbose_name = _("Summary"))
description = models.TextField(verbose_name = _("Description"))
contact = models.CharField(max_length=255, verbose_name = _("Contact Name"))
summary = models.CharField(max_length=255, verbose_name = _("Summary"))
description = models.TextField(verbose_name = _("Description"))
- status = models.TextField(max_length=1, choices=STATUS_CHOICES, default='N', verbose_name = _("Status"))
+ status = models.CharField(max_length=1, choices=STATUS_CHOICES, default='N', verbose_name = _("Status"))
longterm = models.BooleanField(default=False, verbose_name = _("Long term"))
result = models.TextField(blank=True,verbose_name = _("Result"))
longterm = models.BooleanField(default=False, verbose_name = _("Long term"))
result = models.TextField(blank=True,verbose_name = _("Result"))
def get_comments(self, private):
"""
Gets the comments that have been made on this Influence. Each
def get_comments(self, private):
"""
Gets the comments that have been made on this Influence. Each
If private is True, private comments are included in this list.
"""
def quote_reply(comment):
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")])
+ regex = "^([ >]*)(.*)$"
+ text = rewrap(normalize_newlines(comment.comment), 72, regex)
+ return "\n".join(["> " + l for l in text.split("\n")])