Skip to content

Commit

Permalink
Merge pull request #3 from znarthur/master
Browse files Browse the repository at this point in the history
Django 4.0 compatibility fix
  • Loading branch information
michel4j authored Apr 22, 2023
2 parents 79c9485 + 9697dfd commit 864fdd3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion itemlist/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from django.contrib import admin
from django.contrib.admin import FieldListFilter
from django.contrib.admin.options import IncorrectLookupParameters
from django.contrib.admin.utils import get_fields_from_path, lookup_needs_distinct, prepare_lookup_value
from django.contrib.admin.utils import get_fields_from_path, prepare_lookup_value
from django.core.exceptions import FieldDoesNotExist
from django.db import models
from django.urls import reverse_lazy
Expand All @@ -15,6 +15,11 @@
from django.views.generic import ListView
from functools import reduce

try:
from django.contrib.admin.utils import lookup_needs_distinct
except ImportError:
from django.contrib.admin.utils import lookup_spawns_duplicates as lookup_needs_distinct

ALL_VAR = 'all'
ORDER_VAR = 'order'
PAGE_VAR = 'page'
Expand Down

0 comments on commit 864fdd3

Please sign in to comment.