summaryrefslogtreecommitdiffstats
path: root/forum/models/base.py
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-06-07 21:19:50 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-06-07 21:19:50 -0400
commite215c1d15b049b04f7a2497c07d3c9a3f380638d (patch)
tree65257c6d9b55810f39a641edc1bb6dec2d474393 /forum/models/base.py
parent57033196f904477631c397fab50681f0d1aa7834 (diff)
downloadaskbot-e215c1d15b049b04f7a2497c07d3c9a3f380638d.tar.gz
askbot-e215c1d15b049b04f7a2497c07d3c9a3f380638d.tar.bz2
askbot-e215c1d15b049b04f7a2497c07d3c9a3f380638d.zip
envelope turns on correctly for responses, but not for mentions yet, added urls for cache monitoring
Diffstat (limited to 'forum/models/base.py')
-rw-r--r--forum/models/base.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/forum/models/base.py b/forum/models/base.py
index d832b71c..29d4fff3 100644
--- a/forum/models/base.py
+++ b/forum/models/base.py
@@ -4,7 +4,6 @@ from django.utils.html import strip_tags
from django.contrib.auth.models import User
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
-from django.contrib.sitemaps import ping_google
#todo: maybe merge forum.utils.markup and forum.utils.html
from forum.utils import markup
from forum.utils.html import sanitize_html
@@ -98,8 +97,9 @@ def parse_post_text(post):
}
return data
-def save_post(post, **kwargs):
- """generic save method to use with posts
+def parse_and_save_post(post, **kwargs):
+ """generic method to use with posts to be used prior to saving
+ post edit or addition
"""
data = post.parse()
@@ -123,6 +123,9 @@ def save_post(post, **kwargs):
super(post.__class__, post).save(**kwargs)
last_author = post.get_last_author()
+
+ last_author = post.get_last_author()
+
#create new mentions
for u in newly_mentioned_users:
from forum.models.user import Activity
@@ -148,7 +151,7 @@ def save_post(post, **kwargs):
try:
ping_google()
except Exception:
- logging.debug('problem pinging google did you register the sitemap with google?')
+ logging.debug('cannot ping google - did you register with them?')
class UserContent(models.Model):
user = models.ForeignKey(User, related_name='%(class)ss')