﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6933	"You cannot search with spaces if search_fields is declared with ""^"""	Martín Conte Mac Donell <Reflejo@…>	nobody	"That is. When search_fields is declared to ""starts with"" you cannot perform queries with spaces.

File contrib/admin/views/main.py; Line 326:

{{{
for bit in self.query.split():
    or_queries = [models.Q(**{construct_search(field_name): bit}) for field_name in self.search_fields]
    other_qs = QuerySet(self.model)
    (...)
    qs = qs & other_qs
}}}

So, if for example i'm looking for ""Hey dud"" query will be:

{{{
qs.filter(field__startswith=""Hey"") & qs.filter(field__startswith(""dud""))
}}}


"		new	contrib.admin	newforms-admin			nfa-someday		Unreviewed	0	0	0	0		
