|
@@ -2,6 +2,7 @@ from django.db import models
|
|
from django.db.models import F
|
|
from django.db.models import F
|
|
from django.utils import timezone
|
|
from django.utils import timezone
|
|
from django.utils.translation import ugettext_lazy as _
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
+from misago.markdown import clear_markdown
|
|
from misago.signals import (delete_user_content, merge_post, merge_thread,
|
|
from misago.signals import (delete_user_content, merge_post, merge_thread,
|
|
move_forum_content, move_post, move_thread,
|
|
move_forum_content, move_post, move_thread,
|
|
rename_user, sync_user_profile)
|
|
rename_user, sync_user_profile)
|
|
@@ -56,6 +57,10 @@ class Post(models.Model):
|
|
quote.append('\r\n')
|
|
quote.append('\r\n')
|
|
return '\r\n'.join(quote)
|
|
return '\r\n'.join(quote)
|
|
|
|
|
|
|
|
+ @property
|
|
|
|
+ def post_clean(self):
|
|
|
|
+ return clear_markdown(self.post_preparsed)
|
|
|
|
+
|
|
def move_to(self, thread):
|
|
def move_to(self, thread):
|
|
move_post.send(sender=self, move_to=thread)
|
|
move_post.send(sender=self, move_to=thread)
|
|
self.thread = thread
|
|
self.thread = thread
|