diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-07-09 09:23:34 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-07-09 09:23:34 -0500 |
commit | 19e7ec24d0f20db49c58590a1820290ffcb6fe9f (patch) | |
tree | 9884233d1265f73d00fe7e85b92bf500288a3a54 /mediagoblin/user_pages/views.py | |
parent | 83d3922b6e18221456cd8092d78882912f04cf99 (diff) | |
parent | f646f5d36df0730a8c34019dfcc37cca31cc6bb6 (diff) | |
download | mediagoblin-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.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']) |