|
|
@ -21,7 +21,6 @@ from django.db.models import Q |
|
|
|
from django.utils import six, timezone |
|
|
|
from django.utils.translation import ugettext_lazy as _ |
|
|
|
import django_filters |
|
|
|
from django_filters.filterset import STRICTNESS |
|
|
|
from easy_thumbnails import source_generators |
|
|
|
from floppyforms import ClearableFileInput |
|
|
|
import magic |
|
|
@ -685,9 +684,9 @@ def qs_override_django_filter(self): |
|
|
|
valid = self.is_bound and self.form.is_valid() |
|
|
|
|
|
|
|
if self.is_bound and not valid: |
|
|
|
if self.strict == STRICTNESS.RAISE_VALIDATION_ERROR: |
|
|
|
"""if self.strict == STRICTNESS.RAISE_VALIDATION_ERROR: |
|
|
|
raise forms.ValidationError(self.form.errors) |
|
|
|
elif bool(self.strict) == STRICTNESS.RETURN_NO_RESULTS: |
|
|
|
elif bool(self.strict) == STRICTNESS.RETURN_NO_RESULTS:""" |
|
|
|
self._qs = self.queryset.none() |
|
|
|
return self._qs |
|
|
|
# else STRICTNESS.IGNORE... ignoring |
|
|
@ -703,9 +702,9 @@ def qs_override_django_filter(self): |
|
|
|
try: |
|
|
|
value = self.form.fields[name].clean(raw_value) |
|
|
|
except forms.ValidationError: |
|
|
|
if self.strict == STRICTNESS.RAISE_VALIDATION_ERROR: |
|
|
|
"""if self.strict == STRICTNESS.RAISE_VALIDATION_ERROR: |
|
|
|
raise |
|
|
|
elif bool(self.strict) == STRICTNESS.RETURN_NO_RESULTS: |
|
|
|
elif bool(self.strict) == STRICTNESS.RETURN_NO_RESULTS:""" |
|
|
|
self._qs = self.queryset.none() |
|
|
|
return self._qs |
|
|
|
# else STRICTNESS.IGNORE... ignoring |
|
|
|