aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages/views.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-07-02 14:39:35 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-07-02 14:39:35 -0500
commit2110408f4437a9bd7d4d158139cf869518c46456 (patch)
tree2bcd83b06b993c37f1307acdff9d2f9c9e5c8096 /mediagoblin/user_pages/views.py
parent29f9df7b27a443b8e7de793c99bc7606ebcf36cb (diff)
parent6f59a3a32470b4d83ab94fe7c4dae83943500329 (diff)
downloadmediagoblin-2110408f4437a9bd7d4d158139cf869518c46456.tar.lz
mediagoblin-2110408f4437a9bd7d4d158139cf869518c46456.tar.xz
mediagoblin-2110408f4437a9bd7d4d158139cf869518c46456.zip
Merge remote branch 'remotes/jwandborg/feature_362-simple_comments-acts_on_feedback'
Conflicts: mediagoblin/templates/mediagoblin/user_pages/media.html
Diffstat (limited to 'mediagoblin/user_pages/views.py')
-rw-r--r--mediagoblin/user_pages/views.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py
index 399d2020..012d27a3 100644
--- a/mediagoblin/user_pages/views.py
+++ b/mediagoblin/user_pages/views.py
@@ -82,17 +82,19 @@ def user_gallery(request, page):
'media_entries': media_entries,
'pagination': pagination})
+MEDIA_COMMENTS_PER_PAGE = 50
@get_user_media_entry
@uses_pagination
-def media_home(request, media, **kwargs):
+def media_home(request, media, page, **kwargs):
"""
'Homepage' of a MediaEntry()
"""
- comment_form = user_forms.MediaCommentForm(request.POST)
+ pagination = Pagination(page, media.get_comments(), MEDIA_COMMENTS_PER_PAGE)
+ comments = pagination()
- (comments, pagination) = media.get_comments(kwargs.get('page'))
+ comment_form = user_forms.MediaCommentForm(request.POST)
return render_to_response(
request,