Re: Request works with sqlite not with Postgres

2016-04-04 Thread Tazo Gil
%2Fdocs.djangoproject.com%2Fen%2F1.9%2Fref%2Fmodels%2Fquerysets%2F%23django.db.models.Avg&sa=D&sntz=1&usg=AFQjCNHy9ETv9fmPLefytqt0O6V-yhjXgw> > > Le samedi 2 avril 2016 13:08:20 UTC-4, Tazo Gil a écrit : >> >> Hello, >> >> The following request works

Re: Request works with sqlite not with Postgres

2016-04-02 Thread Tazo Gil
I forgot to precise the type of the field Chrono.temps: temps = models.DurationField(null=True) Le samedi 2 avril 2016 19:08:20 UTC+2, Tazo Gil a écrit : > > Hello, > > The following request works in my dev django project (sqlite) by not in > production with po

Request works with sqlite not with Postgres

2016-04-02 Thread Tazo Gil
Hello, The following request works in my dev django project (sqlite) by not in production with postgres out: >>> Questionnaire.objects.filter(site_id=1).annotate(moyenne=Avg('chrono__temps')).values('title','moyenne') The errors : out: Traceback (most recent call last): out: File "", li

Loading sqlite function failed with runserver but works in django shell

2015-08-13 Thread Tazo Gil
Dear all django 1.8 python 3.4 The sqlite function sqlite-Levenshtein (https://github.com/mateusza/SQLite-Levenshtein) is working perfectly in the django shell, example: self.annotate(distance=Func(Value(aword), F('word'), function='levenshtein' )).filter(distance__lte=settings.DISTANCE_LEVENS