Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Sep 13, 2017
1 parent 3a07fb0 commit 3c862f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions django/contrib/admin/views/autocomplete.py
Expand Up @@ -65,8 +65,7 @@ def get(self, request, *args, **kwargs):

def get_queryset(self):
"""
Filter queryset based on the model's ``limit_choices_to`` and search
term.
Return queryset based on the `.ModelAdmin.get_search_results`.
"""
qs = self.model_admin.get_queryset(self.request)
qs, search_use_distinct = self.model_admin.get_search_results(self.request, qs, self.term)
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/admin/widgets.py
Expand Up @@ -425,7 +425,7 @@ def build_attrs(self, base_attrs, extra_attrs=None):
Attributes can be set using the html5 data attribute.
Nested attributes require a double dash, please see:
https://select2.github.io/options.html#how-can-i-set-a-default-value-for-a-nested-option
https://select2.org/configuration/data-attributes#nested-subkey-options
"""
attrs = super().build_attrs(base_attrs, extra_attrs=extra_attrs)
attrs.setdefault('class', '')
Expand Down
2 changes: 1 addition & 1 deletion tests/admin_views/test_autocomplete_view.py
Expand Up @@ -104,7 +104,7 @@ def test_urls(self):

# We can not know if the field is an autocomplete field,
# since `get_autocomplete_fields` requires a request.
# The final this part is therefore not available during the url setup.
# The final url is therefore not available during the url setup.
resolve('/test_admin/admin/admin_views/answer/autocomplete/wrong_field/')

def test_inline_urls(self):
Expand Down

0 comments on commit 3c862f0

Please sign in to comment.