diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-10-11 20:45:00 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2012-10-11 20:45:00 -0400 |
commit | ffcc088eeccfcfb534fa2854ce9ea8df36f6d12c (patch) | |
tree | 50111a9d9faffb9340b23b9884052936130b9c77 /askbot/views/users.py | |
parent | 18de3b9d5d8fadff635867d1b3cd635c23ff0b51 (diff) | |
parent | 777b21410ad3e4ab87169210f646b2c75693d738 (diff) | |
download | askbot-ffcc088eeccfcfb534fa2854ce9ea8df36f6d12c.tar.gz askbot-ffcc088eeccfcfb534fa2854ce9ea8df36f6d12c.tar.bz2 askbot-ffcc088eeccfcfb534fa2854ce9ea8df36f6d12c.zip |
Merge branch 'haystack'
Diffstat (limited to 'askbot/views/users.py')
-rw-r--r-- | askbot/views/users.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/askbot/views/users.py b/askbot/views/users.py index 65862697..707f4e14 100644 --- a/askbot/views/users.py +++ b/askbot/views/users.py @@ -372,7 +372,7 @@ def user_stats(request, user, context): # Questions # questions = user.posts.get_questions().filter(**question_filter).\ - order_by('-score', '-thread__last_activity_at').\ + order_by('-points', '-thread__last_activity_at').\ select_related('thread', 'thread__last_activity_by')[:100] #added this if to avoid another query if questions is less than 100 @@ -393,7 +393,7 @@ def user_stats(request, user, context): ).select_related( 'thread' ).order_by( - '-score', '-added_at' + '-points', '-added_at' )[:100] top_answer_count = len(top_answers) @@ -726,7 +726,7 @@ def user_responses(request, user, context): and "flags" - moderation items for mods only """ - #0) temporary, till urls are fixed: update context + #0) temporary, till urls are fixed: update context # to contain response counts for all sub-sections context.update(view_context.get_for_inbox(request.user)) @@ -906,7 +906,7 @@ def user_favorites(request, user, context): favorite_threads = user.user_favorite_questions.values_list('thread', flat=True) questions = models.Post.objects.filter(post_type='question', thread__in=favorite_threads)\ .select_related('thread', 'thread__last_activity_by')\ - .order_by('-score', '-thread__last_activity_at')[:const.USER_VIEW_DATA_SIZE] + .order_by('-points', '-thread__last_activity_at')[:const.USER_VIEW_DATA_SIZE] data = { 'active_tab':'users', |