aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages/views.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-07-09 09:23:34 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-07-09 09:23:34 -0500
commit19e7ec24d0f20db49c58590a1820290ffcb6fe9f (patch)
tree9884233d1265f73d00fe7e85b92bf500288a3a54 /mediagoblin/user_pages/views.py
parent83d3922b6e18221456cd8092d78882912f04cf99 (diff)
parentf646f5d36df0730a8c34019dfcc37cca31cc6bb6 (diff)
downloadmediagoblin-19e7ec24d0f20db49c58590a1820290ffcb6fe9f.tar.lz
mediagoblin-19e7ec24d0f20db49c58590a1820290ffcb6fe9f.tar.xz
mediagoblin-19e7ec24d0f20db49c58590a1820290ffcb6fe9f.zip
Merge remote branch 'remotes/jwandborg/f431-prevent_comment_link_expiry'
Diffstat (limited to 'mediagoblin/user_pages/views.py')
-rw-r--r--mediagoblin/user_pages/views.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py
index 3a8684d3..a3172ebd 100644
--- a/mediagoblin/user_pages/views.py
+++ b/mediagoblin/user_pages/views.py
@@ -95,8 +95,14 @@ def media_home(request, media, page, **kwargs):
"""
'Homepage' of a MediaEntry()
"""
+ if ObjectId(request.matchdict.get('comment')):
+ pagination = Pagination(
+ page, media.get_comments(), MEDIA_COMMENTS_PER_PAGE,
+ ObjectId(request.matchdict.get('comment')))
+ else:
+ pagination = Pagination(
+ page, media.get_comments(), MEDIA_COMMENTS_PER_PAGE)
- pagination = Pagination(page, media.get_comments(), MEDIA_COMMENTS_PER_PAGE)
comments = pagination()
comment_form = user_forms.MediaCommentForm(request.POST)
@@ -118,7 +124,7 @@ def media_post_comment(request):
comment = request.db.MediaComment()
comment['media_entry'] = ObjectId(request.matchdict['media'])
comment['author'] = request.user['_id']
- comment['content'] = request.POST['comment']
+ comment['content'] = request.POST['comment_content']
comment['content_html'] = cleaned_markdown_conversion(comment['content'])