Commit 11b36d0d7e0b6180d4350898b071409ec6d8b2f6

Authored by Gust
1 parent 6fcf510f

Reverting to work on Django 1.6 too

requirements.txt
1 -https://www.djangoproject.com/download/1.7c2/tarball/ # Download django 1.7 # 1 +Django>=1.6.1,<1.7
  2 +South==0.8.1
2 psycopg2==2.5.1 3 psycopg2==2.5.1
3 django-piston==0.2.3 4 django-piston==0.2.3
4 pytz==2011n 5 pytz==2011n
src/colab/custom_settings.py
@@ -93,6 +93,7 @@ INSTALLED_APPS = INSTALLED_APPS + ( @@ -93,6 +93,7 @@ INSTALLED_APPS = INSTALLED_APPS + (
93 'accounts', 93 'accounts',
94 94
95 # Not standard apps 95 # Not standard apps
  96 + 'south',
96 'raven.contrib.django.raven_compat', 97 'raven.contrib.django.raven_compat',
97 'cliauth', 98 'cliauth',
98 'django_mobile', 99 'django_mobile',
src/super_archives/managers.py
@@ -6,13 +6,13 @@ import django @@ -6,13 +6,13 @@ import django
6 class NotSpamManager(models.Manager): 6 class NotSpamManager(models.Manager):
7 """Only return objects which are not marked as spam.""" 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 class HighestScore(NotSpamManager): 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 return queryset.order_by('-score', '-latest_message__received_time') 16 return queryset.order_by('-score', '-latest_message__received_time')
17 17
18 def from_haystack(self): 18 def from_haystack(self):
@@ -20,11 +20,11 @@ class HighestScore(NotSpamManager): @@ -20,11 +20,11 @@ class HighestScore(NotSpamManager):
20 20
21 21
22 class MostVotedManager(NotSpamManager): 22 class MostVotedManager(NotSpamManager):
23 - def get_queryset(self): 23 + def get_query_set(self):
24 """Query for the most voted messages sorting by the sum of 24 """Query for the most voted messages sorting by the sum of
25 voted and after by date.""" 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 sql = """ 29 sql = """
30 SELECT 30 SELECT