Réparé ce qui faisait planter les tests
authorEric Mc Sween <eric.mcsween@gmail.com>
Thu, 2 Dec 2010 19:32:47 +0000 (14:32 -0500)
committerEric Mc Sween <eric.mcsween@gmail.com>
Thu, 2 Dec 2010 20:37:42 +0000 (15:37 -0500)
auf_savoirs_en_partage/chercheurs/models.py
auf_savoirs_en_partage/settings.py

index 9e1b0e1..7bb449a 100644 (file)
@@ -79,11 +79,8 @@ class ChercheurQuerySet(models.query.QuerySet, RandomQuerySetMixin):
                     Q(etablissement_autre_pays__in=matching_pays) |
                     Q(discipline__in=matching_disciplines) |
                     Q(groupe_recherche__icontains=word) |
                     Q(etablissement_autre_pays__in=matching_pays) |
                     Q(discipline__in=matching_disciplines) |
                     Q(groupe_recherche__icontains=word) |
-                    Q(publication1__in=matching_publications) |
-                    Q(publication2__in=matching_publications) |
-                    Q(publication3__in=matching_publications) |
-                    Q(publication4__in=matching_publications) |
-                    Q(these__in=matching_publications) |
+                    Q(publications__in=matching_publications) |
+                    Q(these__titre__icontains=word) |
                     Q(groupes__in=matching_groupes) |
                     Q(expertises__nom__icontains=word) |
                     Q(mots_cles__icontains=word) |
                     Q(groupes__in=matching_groupes) |
                     Q(expertises__nom__icontains=word) |
                     Q(mots_cles__icontains=word) |
@@ -117,10 +114,7 @@ class ChercheurQuerySet(models.query.QuerySet, RandomQuerySetMixin):
         return self.filter(Q(discipline=discipline) |
                            Q(theme_recherche__icontains=discipline.nom) |
                            Q(groupe_recherche__icontains=discipline.nom) |
         return self.filter(Q(discipline=discipline) |
                            Q(theme_recherche__icontains=discipline.nom) |
                            Q(groupe_recherche__icontains=discipline.nom) |
-                           Q(publication1__titre__icontains=discipline.nom) |
-                           Q(publication2__titre__icontains=discipline.nom) |
-                           Q(publication3__titre__icontains=discipline.nom) |
-                           Q(publication4__titre__icontains=discipline.nom) |
+                           Q(publications__titre__icontains=discipline.nom) |
                            Q(these__titre__icontains=discipline.nom) |
                            Q(groupes__nom__icontains=discipline.nom) |
                            Q(expertises__nom__icontains=discipline.nom) |
                            Q(these__titre__icontains=discipline.nom) |
                            Q(groupes__nom__icontains=discipline.nom) |
                            Q(expertises__nom__icontains=discipline.nom) |
index eb7a747..2390bf8 100644 (file)
@@ -36,9 +36,7 @@ TEMPLATE_LOADERS = (
 )
 
 MIDDLEWARE_CLASSES = (
 )
 
 MIDDLEWARE_CLASSES = (
-    'django.middleware.cache.UpdateCacheMiddleware',
     'django.middleware.common.CommonMiddleware',
     'django.middleware.common.CommonMiddleware',
-    'django.middleware.cache.FetchFromCacheMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'djangoflash.middleware.FlashMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'djangoflash.middleware.FlashMiddleware',