summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/models/post.py11
-rw-r--r--askbot/tests/post_model_tests.py2
2 files changed, 3 insertions, 10 deletions
diff --git a/askbot/models/post.py b/askbot/models/post.py
index 9d1c9513..2592ee94 100644
--- a/askbot/models/post.py
+++ b/askbot/models/post.py
@@ -442,7 +442,7 @@ class Post(models.Model):
return data
#todo: when models are merged, it would be great to remove author parameter
- def parse_and_save_post(post, author = None, **kwargs):
+ def parse_and_save(post, author = None, **kwargs):
"""generic method to use with posts to be used prior to saving
post edit or addition
"""
@@ -450,7 +450,7 @@ class Post(models.Model):
assert(author is not None)
last_revision = post.html
- data = post.parse()
+ data = post.parse_post_text()
post.html = data['html']
newly_mentioned_users = set(data['newly_mentioned_users']) - set([author])
@@ -496,13 +496,6 @@ class Post(models.Model):
except Exception:
logging.debug('cannot ping google - did you register with them?')
- ######################################
- # TODO: Rename the methods above instead of doing this assignment
- parse = parse_post_text
- parse_and_save = parse_and_save_post
- ######################################
-
-
def is_question(self):
return self.post_type == 'question'
diff --git a/askbot/tests/post_model_tests.py b/askbot/tests/post_model_tests.py
index dd1399c1..9a4d47c8 100644
--- a/askbot/tests/post_model_tests.py
+++ b/askbot/tests/post_model_tests.py
@@ -344,7 +344,7 @@ class ThreadRenderLowLevelCachingTests(AskbotTestCase):
# Make sure that title and body text are escaped properly.
# This should be obvious at this point, if the above test passes, but why not be explicit
# UPDATE: And voila, these tests catched double-escaping bug in template, where `<` was `<`
- # And indeed, post.summary is escaped before saving, in parse_and_save_post()
+ # And indeed, post.summary is escaped before saving, in parse_and_save()
# UPDATE 2:Weird things happen with question summary (it's double escaped etc., really weird) so
# let's just make sure that there are no tag placeholders left
self.assertTrue('<<<tag1>>> fake title' in proper_html)