diff options
author | Chris Moylan <chris@chrismoylan.com> | 2011-07-10 22:45:52 -0500 |
---|---|---|
committer | Chris Moylan <chris@chrismoylan.com> | 2011-07-10 22:45:52 -0500 |
commit | 3d073d48cbf797c3da7b19670b8696d2229cce9b (patch) | |
tree | ff32c6b125ccf791d2adc70064d2f7bc7ae6ef3b /mediagoblin/user_pages/views.py | |
parent | 9df37e8a4a9387e9ebe6690d0f18b94a31d7ae4d (diff) | |
parent | 3054e2b3cb08839aca7da2e1c5b4cce1768bf705 (diff) | |
download | mediagoblin-3d073d48cbf797c3da7b19670b8696d2229cce9b.tar.lz mediagoblin-3d073d48cbf797c3da7b19670b8696d2229cce9b.tar.xz mediagoblin-3d073d48cbf797c3da7b19670b8696d2229cce9b.zip |
Merge branch 'master' into test_submission_views_365
Diffstat (limited to 'mediagoblin/user_pages/views.py')
-rw-r--r-- | mediagoblin/user_pages/views.py | 10 |
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']) |