diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-08-19 21:30:15 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2009-08-19 21:30:15 -0400 |
commit | 3a4b6ad43221abc0e0ff345d9368c3348b312128 (patch) | |
tree | 2ce70a5d5fb0eab245126fab7fac628fab0cffbe /forum | |
parent | d5449b465875ff31a28681cf961c18ba94835c15 (diff) | |
download | askbot-3a4b6ad43221abc0e0ff345d9368c3348b312128.tar.gz askbot-3a4b6ad43221abc0e0ff345d9368c3348b312128.tar.bz2 askbot-3a4b6ad43221abc0e0ff345d9368c3348b312128.zip |
added Adolfos mods, django_authopeid bug, unified traditional and OpenID login
Diffstat (limited to 'forum')
-rw-r--r-- | forum/managers.py | 2 | ||||
-rw-r--r-- | forum/views.py | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/forum/managers.py b/forum/managers.py index 2e3e4186..6ae0ed99 100644 --- a/forum/managers.py +++ b/forum/managers.py @@ -20,7 +20,7 @@ class QuestionManager(models.Manager): return questions def get_unanswered_questions(self, orderby): - questions = self.filter(deleted=False, answer_count=0).order_by(orderby) + questions = self.filter(deleted=False, answer_accepted=False).order_by(orderby) return questions def get_questions(self, orderby): diff --git a/forum/views.py b/forum/views.py index ce722118..d663a4cb 100644 --- a/forum/views.py +++ b/forum/views.py @@ -1149,12 +1149,8 @@ def user_stats(request, user_id, user_view): params=[user.id] ).values('id', 'name', 'description', 'type') total_awards = awards.count() - #fixed to work with Django version < 1.1 - try: - from django.db.models import Count - awards = awards.annotate(count = Count('badge__id')) - except: - pass + from django.db.models import Count + awards = awards.annotate(count = Count('badge__id')) return render_to_response(user_view.template_file,{ "tab_name" : user_view.id, |