Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some operators should not require a value #8

Open
asfaltboy opened this issue Dec 11, 2015 · 4 comments
Open

Some operators should not require a value #8

asfaltboy opened this issue Dec 11, 2015 · 4 comments

Comments

@asfaltboy
Copy link
Member

The operator values isnull, istrue and isfalse should allow a null/empty value when submitting the form. To be more intuitive we should set the value field to disabled when it one of the mentioned operators is selected.

image

@ianfitzpatrick
Copy link

This tripped me up too. For boolean fields, like for instance is_active on the user record, equals "1" or equals "True" returned no results for me. I tried setting the operating to "is TRUE" but was getting the value field required error so was pretty confused.

It didn't occur to me to simply set the value field to null to get this filter working. A little counter intuitive for sure.

@asfaltboy
Copy link
Member Author

I may get to this by next weekend, but any PRs (even with simple documentation clarification) are most welcome.

@asfaltboy asfaltboy modified the milestones: 1.0.3, 1.0.4 Apr 14, 2016
@asfaltboy asfaltboy modified the milestones: 1.0.5, 1.0.6 Jan 3, 2017
@mrname
Copy link

mrname commented Jun 28, 2018

#82

zeevt pushed a commit to zeevt/django-advanced-filters that referenced this issue Jul 11, 2021
* update README

remove confusion from the installation instruction

* test: refactor unittest test cases to pytest

* chore: replace deprecated assertEquals

* chore: replace deprecated logger.warn with warning

* style: correct small code style bugs

* chore: bump test dependencies

* use soft version for coveralls to support python 2.7
* use pycodestyle instead of older pep8
* bump to latest versions of factory-boy and pytest-django

* Update CI (modlinltd#1)

* fixup! test: refactor unittest test cases to pytest

* fix: update requirements for new test deps matrix

* use tox-travis to keep the travis and tox requirements fairly clean
* drop versions <3.5 and add released 3.8
* use travis python config and specify pypy3.6
* allow any version of coveralls (easier support for python 2.7)
* add up to django 3.0 version according to official dep matrix:

Refs:
- https://www.djangoproject.com/download/#supported-versions
- https://docs.djangoproject.com/en/dev/faq/install/

* Django 3.0

fix modlinltd#110

* fix: switch deprecated force_text to force_str

* fix: avoid installing newer braces

due to hard requirement of Django 1.11, it's incompatible with our
wish to still support django versions 1.9 and 1.10

* fixup! test: refactor unittest test cases to pytest

* chore: update python and add Django classifiers

* docs: update dependencies stated in the README

+ update link to vtiger ref

* test: add a failing test_choices_has_null

required setting a string field to nullable in the Client test model

+ test that datetime field choices are being excluded

* fix: allow choices sort on None fields

; Conflicts:
;	advanced_filters/views.py

* add release workflow

* test: test the CleanWhiteSpacesMixin helper

* chore: update changelog and bump version to 1.2.0

* docs: fix typo and clarify title

Switching to using the python publish github action which uses
twine to push source and wheel to pypi whenever a release is created
in GitHub

* fix: correct travis.yml deprecated/dupe keywords

* Update django-braces

* import FieldDoesNotExist from django.core.exceptions

* fix: update test matrix to include Django 3.1

Ref: https://docs.djangoproject.com/en/3.1/faq/install/

* chore(setup.py): add Django 3.1 to classifiers

+ sort imports

* Add Turkish translation

* Update Admin to show model

* Add support for python 3.9 and django 3.1

* chore: update changelog and bump version to 1.3.0

Co-authored-by: Pavel Savchenko <asfaltboy@gmail.com>
Co-authored-by: Arpit <ravaan@users.noreply.github.com>
Co-authored-by: Petr Dlouhý <petr.dlouhy@email.cz>
Co-authored-by: Hugo Maingonnat <hugo@deepomatic.com>
Co-authored-by: João Batista <joaobatista.sf@hotmail.com>
Co-authored-by: predatell <predatell@bitmessage.ch>
Co-authored-by: Özcan YARIMDÜNYA <ozcan.yarimdunya@gtech.com.tr>
Co-authored-by: Thu Trang Pham <thuutrangpham@gmail.com>
@eriktelepovsky
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants