From 4efb7fb7e716788ff65fea74cba60e211b4944eb Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Sun, 15 Apr 2018 11:39:04 +0200 Subject: On importe RawSQL que lorsqu’on utilise PostgreSQL --- views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views.py b/views.py index c3bcdc2..2a500c1 100644 --- a/views.py +++ b/views.py @@ -17,7 +17,6 @@ import datetime from django.db import connection from django.db.models import Count, Max -from django.db.models.expressions import RawSQL from django.db.models.functions import ExtractWeek, ExtractYear, Length from django.http import Http404 from django.shortcuts import get_object_or_404, render @@ -31,6 +30,7 @@ import edt if connection.vendor == "postgresql": from django.contrib.postgres.aggregates import ArrayAgg + from django.db.models.expressions import RawSQL def index(request): years = Year.objects.order_by("name") -- cgit v1.2.1