diff options
author | Alban Gruin | 2018-04-15 11:39:04 +0200 |
---|---|---|
committer | Alban Gruin | 2018-04-15 11:39:04 +0200 |
commit | 4efb7fb7e716788ff65fea74cba60e211b4944eb (patch) | |
tree | 71e4d4197d4e483397ff323679ee2e6b899380fe | |
parent | 3f2b67605dea039c9498a1c67a89ef6d5443e0a9 (diff) |
On importe RawSQL que lorsqu’on utilise PostgreSQL
-rw-r--r-- | views.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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") |