-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Align SearchFilter behaviour to django.contrib.admin search #9017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
dee83ce
ad96159
82c42dc
1ce85d0
a7bafb7
67cd9c2
140b398
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
versions of Django/Python, and compatibility wrappers around optional packages. | ||
""" | ||
import django | ||
from django.conf import settings | ||
from django.views.generic import View | ||
|
||
|
||
|
@@ -14,13 +13,6 @@ def unicode_http_header(value): | |
return value | ||
|
||
|
||
def distinct(queryset, base): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we change this in a separate PR? or it is part of the change in this PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It could be splitted, however this method was introduced in b4b2dc1 only for the search class and putted into IMO this should be kept togheter with the rest of the PR since this change goes in the same direction of "align the behaviour with django". I just noticed that the code I used (which was introduced in django/django@1871182) has just been removed from the main branch in django/django@d569c1d. So the whole thing may just be changed to use PS: I really do not understand why 8 years ago there was the need to have a different implementation of distinct only for Oracle engine and why this was implemented here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
at that time django oracle back end was not properly maintained. but now it is |
||
if settings.DATABASES[queryset.db]["ENGINE"] == "django.db.backends.oracle": | ||
# distinct analogue for Oracle users | ||
return base.filter(pk__in=set(queryset.values_list('pk', flat=True))) | ||
return queryset.distinct() | ||
|
||
|
||
# django.contrib.postgres requires psycopg2 | ||
try: | ||
from django.contrib.postgres import fields as postgres_fields | ||
|
Uh oh!
There was an error while loading. Please reload this page.