From 95b56d1f316515ec2b9bb966585c7b3995bbe9be Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 17 Aug 2016 20:22:29 +0200 Subject: [PATCH] Use titles for autocompletion, bump mezzanine version to 4.2 --- app/organization/magazine/views.py | 6 +++--- requirements-dev.txt | 4 ++-- requirements.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/organization/magazine/views.py b/app/organization/magazine/views.py index a5763f85..945d4f64 100644 --- a/app/organization/magazine/views.py +++ b/app/organization/magazine/views.py @@ -96,14 +96,14 @@ class ObjectAutocomplete(Select2QuerySetSequenceView): if self.q: #qs = qs.filter(name__istartswith=self.q) - articles = articles.filter(name__icontains=self.q) - topics = topics.filter(name__icontains=self.q) + articles = articles.filter(title__icontains=self.q) + topics = topics.filter(title__icontains=self.q) qs = autocomplete.QuerySetSequence(articles, topics) if self.q: # This would apply the filter on all the querysets - qs = qs.filter(name__icontains=self.q) + qs = qs.filter(title__icontains=self.q) # This will limit each queryset so that they show an equal number # of results. diff --git a/requirements-dev.txt b/requirements-dev.txt index ace5a184..bc7ae6d6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ -e git+https://github.com/yomguy/mezzanine-agenda.git#egg=mezzanine-agenda-0.2.2 --e git+https://github.com/stephenmcd/mezzanine.git@master#egg=mezzanine-4.1-master +#-e git+https://github.com/stephenmcd/mezzanine.git@master#egg=mezzanine-4.2.master -e git+https://github.com/stephenmcd/grappelli-safe.git@dynamic_stacked#egg=grappelli-safe-0.4.2 --e git+https://github.com/yourlabs/django-autocomplete-light.git#egg=django-autocomplete-light +#-e git+https://github.com/yourlabs/django-autocomplete-light.git#egg=django-autocomplete-light #https://forge.ircam.fr/p/django-eve/source/download/dev/ diff --git a/requirements.txt b/requirements.txt index 080247cd..bff21316 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ mysqlclient psycopg2 pyquery Django==1.9.7 -mezzanine==4.1.0 +mezzanine==4.2.0 django-modeltranslation django-meta django-bower -- 2.39.5