Initial commit to support per page search.

This commit is contained in:
Roberto Rosario
2016-10-27 02:48:40 -04:00
parent f66f815ba6
commit b8b2e0e929
14 changed files with 278 additions and 95 deletions
+8
View File
@@ -5,6 +5,14 @@ from django.utils.translation import ugettext_lazy as _
class AdvancedSearchForm(forms.Form):
_match_all = forms.BooleanField(
label=_('Match all'), help_text=_(
'When checked, only results that match all fields will be '
'returned. When unchecked results that match at least one field '
'will be returned.'
), required=False
)
def __init__(self, *args, **kwargs):
self.search_model = kwargs.pop('search_model')
super(AdvancedSearchForm, self).__init__(*args, **kwargs)