Commit 2deba920 authored by Michal Čihař's avatar Michal Čihař

Lower minimal length of search text

For languages like Chinese asking for more than two chars is ridiculous
(issue #335).
parent f4558f1e
...@@ -222,7 +222,7 @@ class SearchForm(forms.Form): ...@@ -222,7 +222,7 @@ class SearchForm(forms.Form):
# pylint: disable=C0103 # pylint: disable=C0103
q = forms.CharField( q = forms.CharField(
label=_('Query'), label=_('Query'),
min_length=4, min_length=2,
) )
search = forms.ChoiceField( search = forms.ChoiceField(
label=_('Search type'), label=_('Search type'),
......
...@@ -905,7 +905,7 @@ class SearchViewTest(ViewTestCase): ...@@ -905,7 +905,7 @@ class SearchViewTest(ViewTestCase):
# Short string # Short string
self.do_search( self.do_search(
{'q': 'x'}, {'q': 'x'},
'Ensure this value has at least 4 characters (it has 1).' 'Ensure this value has at least 2 characters (it has 1).'
) )
# Wrong type # Wrong type
self.do_search( self.do_search(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment