Skip to content

Commit

Permalink
Merge pull request #68 from farhan0581/pre_release
Browse files Browse the repository at this point in the history
Fixes ForeignObjectRel import for django 2 and django 3 and documentation updates
  • Loading branch information
farhan0581 authored Sep 11, 2021
2 parents 8a0ea8c + 0464340 commit 947099b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class CustomSearchView(AutocompleteJsonView):
"""
your custom logic goes here.
"""
queryset = Artist.objects.all().order_by('name')
queryset = super().get_queryset()
queryset = queryset.order_by('name')
return queryset
```

Expand Down
2 changes: 1 addition & 1 deletion admin_auto_filters/filters.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib.admin.widgets import AutocompleteSelect as Base
from django import forms
from django.contrib import admin
from django.db.models import ForeignObjectRel
from django.db.models.fields.related import ForeignObjectRel
from django.db.models.constants import LOOKUP_SEP # this is '__'
from django.db.models.fields.related_descriptors import ReverseManyToOneDescriptor, ManyToManyDescriptor
from django.forms.widgets import Media, MEDIA_TYPES, media_property
Expand Down

0 comments on commit 947099b

Please sign in to comment.