@property
def qs(self):
    if (not hasattr(self, '_qs')):
        valid = (self.is_bound and self.form.is_valid())
        if (self.is_bound and (not valid)):
            if (self.strict == STRICTNESS.RAISE_VALIDATION_ERROR):
                raise forms.ValidationError(self.form.errors)
            elif (bool(self.strict) == STRICTNESS.RETURN_NO_RESULTS):
                self._qs = self.queryset.none()
                return self._qs
        qs = self.queryset.all()
        for (name, filter_) in six.iteritems(self.filters):
            value = None
            if valid:
                value = self.form.cleaned_data[name]
            else:
                raw_value = self.form[name].value()
                try:
                    value = self.form.fields[name].clean(raw_value)
                except forms.ValidationError:
                    if (self.strict == STRICTNESS.RAISE_VALIDATION_ERROR):
                        raise
                    elif (bool(self.strict) == STRICTNESS.RETURN_NO_RESULTS):
                        self._qs = self.queryset.none()
                        return self._qs
            if (value is not None):
                qs = filter_.filter(qs, value)
        if self._meta.order_by:
            order_field = self.form.fields[self.order_by_field]
            data = self.form[self.order_by_field].data
            ordered_value = None
            try:
                ordered_value = order_field.clean(data)
            except forms.ValidationError:
                pass
            if ((ordered_value in EMPTY_VALUES) and self.strict):
                ordered_value = self.form.fields[self.order_by_field].choices[0][0]
            if ordered_value:
                qs = qs.order_by(*self.get_order_by(ordered_value))
        self._qs = qs
    return self._qs
@property
def qs(self):
    if (not hasattr(self, '_qs')):
        valid = (self.is_bound and self.form.is_valid())
        if (self.is_bound and (not valid)):
            if (self.strict == STRICTNESS.RAISE_VALIDATION_ERROR):
                raise forms.ValidationError(self.form.errors)
            elif (bool(self.strict) == STRICTNESS.RETURN_NO_RESULTS):
                self._qs = self.queryset.none()
                return self._qs
        qs = self.queryset.all()
        for (name, filter_) in six.iteritems(self.filters):
            value = None
            if valid:
                value = self.form.cleaned_data[name]
            else:
                raw_value = self.form[name].value()
                try:
                    value = self.form.fields[name].clean(raw_value)
                except forms.ValidationError:
                    if (self.strict == STRICTNESS.RAISE_VALIDATION_ERROR):
                        raise
                    elif (bool(self.strict) == STRICTNESS.RETURN_NO_RESULTS):
                        self._qs = self.queryset.none()
                        return self._qs
            if (value is not None):
                qs = filter_.filter(qs, value)
        if self._meta.order_by:
            order_field = self.form.fields[self.order_by_field]
            data = self.form[self.order_by_field].data
            ordered_value = None
            try:
                ordered_value = order_field.clean(data)
            except forms.ValidationError:
                pass
            if ((ordered_value in EMPTY_VALUES) and self.strict):
                ordered_value = self.form.fields[self.order_by_field].choices[0][0]
            if ordered_value:
                qs = qs.order_by(*self.get_order_by(ordered_value))
        self._qs = qs
    return self._qs