Skip to content

Commit 842340d

Browse files
committed
[search-api] Allow shorthand for fields (attribute shorthand already supported)
git-svn-id: http://code.djangoproject.com/svn/django/branches/search-api@3645 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 91790e2 commit 842340d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

django/contrib/search/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def __init__(self, path, model, fields=None, attributes=None, namespace=None, **
9393
"""
9494
if fields is None:
9595
fields = []
96+
elif isinstance(fields, basestring):
97+
fields = [fields]
9698
if attributes is None:
9799
attributes = kwargs
98100
else:

0 commit comments

Comments
 (0)