diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-10 11:53:48 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-05-10 11:53:48 -0400 |
commit | 6f853b5c6398a4f8458b90ceddf65cb96c89646d (patch) | |
tree | 4d2c5d8fb4b336818deb8cc104a5b86760d86a11 | |
parent | f2b36a4fcbc8c5688e599bc3fabc1c60a1b657c3 (diff) | |
download | askbot-6f853b5c6398a4f8458b90ceddf65cb96c89646d.tar.gz askbot-6f853b5c6398a4f8458b90ceddf65cb96c89646d.tar.bz2 askbot-6f853b5c6398a4f8458b90ceddf65cb96c89646d.zip |
touched up on timzone issue again and added cache invalidation to comment editing
-rw-r--r-- | askbot/models/__init__.py | 1 | ||||
-rw-r--r-- | askbot/views/writers.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py index 3eca3c0e..5e41a07a 100644 --- a/askbot/models/__init__.py +++ b/askbot/models/__init__.py @@ -1420,6 +1420,7 @@ def user_edit_comment( edited_by = self, by_email = by_email ) + comment_post.thread.invalidate_cached_data() def user_edit_post(self, post = None, diff --git a/askbot/views/writers.py b/askbot/views/writers.py index 8b02adfb..935b7cfa 100644 --- a/askbot/views/writers.py +++ b/askbot/views/writers.py @@ -540,7 +540,7 @@ def __generate_comments_json(obj, user):#non-view generates json data for the po comment_owner = comment.author - tz = template_filters.TIMEZONE_STR + tz = ' ' + template_filters.TIMEZONE_STR comment_data = {'id' : comment.id, 'object_id': obj.id, 'comment_added_at': str(comment.added_at.replace(microsecond = 0)) + tz, @@ -603,7 +603,7 @@ def edit_comment(request): is_deletable = template_filters.can_delete_comment(comment_post.author, comment_post) is_editable = template_filters.can_edit_comment(comment_post.author, comment_post) - tz = template_filters.TIMEZONE_STR + tz = ' ' + template_filters.TIMEZONE_STR return { 'id' : comment_post.id, |