aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages/views.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-11-19 14:01:38 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-11-19 14:01:38 -0600
commit7c378f2cd5324a05e709cbada5eb5668ce3a3469 (patch)
treeb98a10516c85659e89b713c93483abe750f5c702 /mediagoblin/user_pages/views.py
parent5db324f7c60506cfb8124dc72ac8f408c341c0a0 (diff)
downloadmediagoblin-7c378f2cd5324a05e709cbada5eb5668ce3a3469.tar.lz
mediagoblin-7c378f2cd5324a05e709cbada5eb5668ce3a3469.tar.xz
mediagoblin-7c378f2cd5324a05e709cbada5eb5668ce3a3469.zip
Allow user to set whether comments are ascending or descending
Diffstat (limited to 'mediagoblin/user_pages/views.py')
-rw-r--r--mediagoblin/user_pages/views.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py
index 98a21bb4..25fd2ebb 100644
--- a/mediagoblin/user_pages/views.py
+++ b/mediagoblin/user_pages/views.py
@@ -106,11 +106,15 @@ def media_home(request, media, page, **kwargs):
"""
if ObjectId(request.matchdict.get('comment')):
pagination = Pagination(
- page, media.get_comments(True), MEDIA_COMMENTS_PER_PAGE,
+ page, media.get_comments(
+ mg_globals.app_config['comments_ascending']),
+ MEDIA_COMMENTS_PER_PAGE,
ObjectId(request.matchdict.get('comment')))
else:
pagination = Pagination(
- page, media.get_comments(True), MEDIA_COMMENTS_PER_PAGE)
+ page, media.get_comments(
+ mg_globals.app_config['comments_ascending']),
+ MEDIA_COMMENTS_PER_PAGE)
comments = pagination()