Commit 11b36d0d7e0b6180d4350898b071409ec6d8b2f6
1 parent
6fcf510f
Exists in
master
and in
39 other branches
Reverting to work on Django 1.6 too
Showing
3 changed files
with
9 additions
and
7 deletions
Show diff stats
requirements.txt
src/colab/custom_settings.py
src/super_archives/managers.py
| ... | ... | @@ -6,13 +6,13 @@ import django |
| 6 | 6 | class NotSpamManager(models.Manager): |
| 7 | 7 | """Only return objects which are not marked as spam.""" |
| 8 | 8 | |
| 9 | - def get_queryset(self): | |
| 10 | - return super(NotSpamManager, self).get_queryset().exclude(spam=True) | |
| 9 | + def get_query_set(self): | |
| 10 | + return super(NotSpamManager, self).get_query_set().exclude(spam=True) | |
| 11 | 11 | |
| 12 | 12 | |
| 13 | 13 | class HighestScore(NotSpamManager): |
| 14 | - def get_queryset(self): | |
| 15 | - queryset = super(HighestScore, self).get_queryset() | |
| 14 | + def get_query_set(self): | |
| 15 | + queryset = super(HighestScore, self).get_query_set() | |
| 16 | 16 | return queryset.order_by('-score', '-latest_message__received_time') |
| 17 | 17 | |
| 18 | 18 | def from_haystack(self): |
| ... | ... | @@ -20,11 +20,11 @@ class HighestScore(NotSpamManager): |
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | class MostVotedManager(NotSpamManager): |
| 23 | - def get_queryset(self): | |
| 23 | + def get_query_set(self): | |
| 24 | 24 | """Query for the most voted messages sorting by the sum of |
| 25 | 25 | voted and after by date.""" |
| 26 | 26 | |
| 27 | - queryset = super(MostVotedManager, self).get_queryset() | |
| 27 | + queryset = super(MostVotedManager, self).get_query_set() | |
| 28 | 28 | |
| 29 | 29 | sql = """ |
| 30 | 30 | SELECT | ... | ... |